Skip to content

Commit

Permalink
Use nlohmann_json package instead of submodule (LizardByte#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
chewi authored and KuleRucket committed Jun 6, 2024
1 parent 675e4fd commit e1985de
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions cmake/compile_definitions/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,4 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${PLATFORM_LIBRARIES}
nlohmann_json::nlohmann_json)
${PLATFORM_LIBRARIES})
1 change: 1 addition & 0 deletions cmake/compile_definitions/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ list(PREPEND PLATFORM_LIBRARIES
avrt
iphlpapi
shlwapi
PkgConfig::NLOHMANN_JSON
${CURL_STATIC_LIBRARIES})

if(SUNSHINE_ENABLE_TRAY)
Expand Down
3 changes: 0 additions & 3 deletions cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions cmake/dependencies/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions docs/source/building/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 4 additions & 3 deletions packaging/macos/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion third-party/nlohmann_json
Submodule nlohmann_json deleted from 9cca28

0 comments on commit e1985de

Please sign in to comment.