diff --git a/CMakeLists.txt b/CMakeLists.txt index 14f6edadf0..ec8e3a91ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,10 @@ IF(WITH_ASSIMP) FIND_PACKAGE(assimp REQUIRED) ENDIF() +IF(WITH_MSQUIC) + FIND_PACKAGE(msquic REQUIRED) +ENDIF() + IF(WITH_NEL) IF(WITH_NEL_TESTS) FIND_PACKAGE(CppTest) diff --git a/CMakeModules/ConfigureChecks.cmake b/CMakeModules/ConfigureChecks.cmake index 9de2e8214a..da4408ca10 100644 --- a/CMakeModules/ConfigureChecks.cmake +++ b/CMakeModules/ConfigureChecks.cmake @@ -31,6 +31,10 @@ MACRO(NL_CONFIGURE_CHECKS) SET(NL_XAUDIO2_AVAILABLE 1) ENDIF() + IF(WITH_MSQUIC) + SET(NL_MSQUIC_AVAILABLE 1) + ENDIF() + IF(NOT RYZOM_VERSION_MAJOR) SET(RYZOM_VERSION_MAJOR ${NL_VERSION_MAJOR}) SET(RYZOM_VERSION_MINOR ${NL_VERSION_MINOR}) diff --git a/CMakeModules/Findmsquic.cmake b/CMakeModules/Findmsquic.cmake new file mode 100644 index 0000000000..0fc6cb0cde --- /dev/null +++ b/CMakeModules/Findmsquic.cmake @@ -0,0 +1,42 @@ +IF(msquic_FIND_REQUIRED) + SET(msquic_FIND_REQUIRED ON) +ENDIF() + +FIND_PATH( + msquic_INCLUDE_DIRS + NAMES msquic.h + PATHS /usr/local/include/ +) + +FIND_LIBRARY( + msquic_LIBRARY_RELEASE + NAMES msquic + PATHS /usr/local/lib/ +) + +FIND_LIBRARY( + msquic_LIBRARY_DEBUG + NAMES msquicd + PATHS /usr/local/lib/ +) + +IF (msquic_INCLUDE_DIRS) + SET(msquic_FOUND TRUE) + IF(msquic_LIBRARY_RELEASE AND msquic_LIBRARY_DEBUG) + SET(msquic_LIBRARIES ${msquic_LIBRARIES} optimized ${msquic_LIBRARY_RELEASE}) + SET(msquic_LIBRARIES ${msquic_LIBRARIES} debug ${msquic_LIBRARY_DEBUG}) + ENDIF() + IF(msquic_LIBRARY_RELEASE) + SET(msquic_LIBRARIES ${msquic_LIBRARIES} ${msquic_LIBRARY_RELEASE}) + ENDIF() +ENDIF() + +IF (msquic_FOUND) + IF (NOT msquic_FIND_QUIETLY) + MESSAGE(STATUS "Found msquic library: ${msquic_LIBRARIES}") + ENDIF () +ELSE (msquic_FOUND) + IF (msquic_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find msquic library") + ENDIF () +ENDIF () diff --git a/CMakeModules/nel.cmake b/CMakeModules/nel.cmake index bf94ff84bc..ff65366478 100644 --- a/CMakeModules/nel.cmake +++ b/CMakeModules/nel.cmake @@ -282,6 +282,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_LIBGSF "Use libgsf for max file library" OFF) OPTION(WITH_FFMPEG "Use ffmpeg for audio decoder" OFF) + OPTION(WITH_MSQUIC "Use msquic for QUIC networking support" OFF) ### # GUI toolkits diff --git a/config.h.cmake b/config.h.cmake index 140934d1e8..eedaec098e 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -12,6 +12,8 @@ #cmakedefine NL_STEREO_AVAILABLE ${NL_STEREO_AVAILABLE} +#cmakedefine NL_MSQUIC_AVAILABLE ${NL_MSQUIC_AVAILABLE} + #cmakedefine NL_BIN_PREFIX "${NL_BIN_ABSOLUTE_PREFIX}" #cmakedefine NL_ETC_PREFIX "${NL_ETC_ABSOLUTE_PREFIX}" #cmakedefine NL_SHARE_PREFIX "${NL_SHARE_ABSOLUTE_PREFIX}" diff --git a/ryzom/server/src/frontend_service/CMakeLists.txt b/ryzom/server/src/frontend_service/CMakeLists.txt index 2b1dc4bd84..2aeaeadec0 100644 --- a/ryzom/server/src/frontend_service/CMakeLists.txt +++ b/ryzom/server/src/frontend_service/CMakeLists.txt @@ -8,6 +8,8 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/property_dispatcher.cpp ${CMAKE_CURRENT_SOURCE_DIR}/property_dispatcher.h) +SOURCE_GROUP("" FILES ${SRC}) + ADD_EXECUTABLE(ryzom_frontend_service WIN32 ${SRC}) INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR}) @@ -21,6 +23,11 @@ TARGET_LINK_LIBRARIES(ryzom_frontend_service nelgeorges nelligo) +IF(WITH_MSQUIC) + INCLUDE_DIRECTORIES(${msquic_INCLUDE_DIRS}) + TARGET_LINK_LIBRARIES(ryzom_frontend_service ${msquic_LIBRARIES}) +ENDIF() + NL_DEFAULT_PROPS(ryzom_frontend_service "Ryzom, Services: Frontend Service (FS)") NL_ADD_RUNTIME_FLAGS(ryzom_frontend_service)