diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1005458c93..60f555c2166 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -769,6 +769,7 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-curl mingw-w64-x86_64-miniupnpc + mingw-w64-x86_64-nlohmann-json mingw-w64-x86_64-nodejs mingw-w64-x86_64-nsis mingw-w64-x86_64-onevpl diff --git a/.gitmodules b/.gitmodules index 67522f450ed..a4231d16f72 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,10 +10,6 @@ path = third-party/nanors url = https://github.com/sleepybishop/nanors.git branch = master -[submodule "third-party/nlohmann_json"] - path = third-party/nlohmann_json - url = https://github.com/nlohmann/json - branch = master [submodule "third-party/nv-codec-headers"] path = third-party/nv-codec-headers url = https://github.com/FFmpeg/nv-codec-headers diff --git a/cmake/compile_definitions/common.cmake b/cmake/compile_definitions/common.cmake index ca6ddcbb0f3..646e1298e43 100644 --- a/cmake/compile_definitions/common.cmake +++ b/cmake/compile_definitions/common.cmake @@ -152,5 +152,4 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} - ${PLATFORM_LIBRARIES} - nlohmann_json::nlohmann_json) + ${PLATFORM_LIBRARIES}) diff --git a/cmake/compile_definitions/windows.cmake b/cmake/compile_definitions/windows.cmake index 2095cc5baa4..699a84c184d 100644 --- a/cmake/compile_definitions/windows.cmake +++ b/cmake/compile_definitions/windows.cmake @@ -84,6 +84,7 @@ list(PREPEND PLATFORM_LIBRARIES avrt iphlpapi shlwapi + PkgConfig::NLOHMANN_JSON ${CURL_STATIC_LIBRARIES}) if(SUNSHINE_ENABLE_TRAY) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index a1f35128005..29bed10e5cd 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -19,9 +19,6 @@ pkg_check_modules(CURL REQUIRED libcurl) pkg_check_modules(MINIUPNP miniupnpc REQUIRED) include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) -# nlohmann_json -add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json") - # ffmpeg pre-compiled binaries if(WIN32) if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") diff --git a/cmake/dependencies/windows.cmake b/cmake/dependencies/windows.cmake index 376c44da65a..a7ecce3963d 100644 --- a/cmake/dependencies/windows.cmake +++ b/cmake/dependencies/windows.cmake @@ -2,3 +2,6 @@ set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103 find_package(Boost 1.71.0 COMPONENTS locale log filesystem program_options REQUIRED) + +# nlohmann_json +pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET) diff --git a/docs/source/building/windows.rst b/docs/source/building/windows.rst index 8e83c58e99d..f73346ffebf 100644 --- a/docs/source/building/windows.rst +++ b/docs/source/building/windows.rst @@ -26,6 +26,7 @@ Install dependencies: mingw-w64-x86_64-cmake \ mingw-w64-x86_64-curl \ mingw-w64-x86_64-miniupnpc \ + mingw-w64-x86_64-nlohmann-json \ mingw-w64-x86_64-nodejs \ mingw-w64-x86_64-onevpl \ mingw-w64-x86_64-openssl \ diff --git a/packaging/macos/Portfile b/packaging/macos/Portfile index 2ef8098f155..ba4815e25dc 100644 --- a/packaging/macos/Portfile +++ b/packaging/macos/Portfile @@ -31,12 +31,13 @@ post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive" } +depends_build-append port:npm9 \ + port:pkgconfig + depends_lib port:avahi \ port:curl \ port:libopus \ - port:miniupnpc \ - port:npm9 \ - port:pkgconfig + port:miniupnpc boost.version 1.81 diff --git a/third-party/nlohmann_json b/third-party/nlohmann_json deleted file mode 160000 index 9cca280a4d0..00000000000 --- a/third-party/nlohmann_json +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03