File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ if(_icey_have_libdatachannel AND DEFINED icey_FIND_COMPONENTS AND "webrtc" IN_LI
4444endif ()
4545
4646if (@USE_SYSTEM_DEPS@)
47+ if ("json" IN_LIST _icey_supported_components)
48+ find_dependency (nlohmann_json CONFIG )
49+ endif ()
4750 find_package (libuv CONFIG QUIET )
4851 if (NOT TARGET libuv::uv_a AND NOT TARGET libuv::uv AND NOT TARGET libuv::libuv AND PkgConfig_FOUND)
4952 pkg_check_modules (LIBUV QUIET IMPORTED_TARGET GLOBAL libuv )
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ if(NOT TARGET llhttp_static)
5959endif ()
6060
6161if (@USE_SYSTEM_DEPS@)
62+ if ("json" IN_LIST _icey_supported_components)
63+ find_dependency (nlohmann_json CONFIG )
64+ endif ()
6265 find_dependency (ZLIB )
6366 if ("archo" IN_LIST _icey_supported_components OR "pacm" IN_LIST _icey_supported_components)
6467 find_dependency (unofficial-minizip CONFIG QUIET )
Original file line number Diff line number Diff line change @@ -210,6 +210,9 @@ else()
210210 pkg_check_modules (LIBUV QUIET IMPORTED_TARGET GLOBAL libuv )
211211 endif ()
212212 find_package (llhttp CONFIG QUIET )
213+ if (BUILD_MODULES AND (NOT DEFINED BUILD_MODULE_json OR BUILD_MODULE_json))
214+ find_package (nlohmann_json CONFIG REQUIRED )
215+ endif ()
213216 find_package (ZLIB REQUIRED )
214217 if (NOT TARGET llhttp_static
215218 AND NOT TARGET llhttp::llhttp_static
Original file line number Diff line number Diff line change 1- icy_add_module (json
2- DEPENDS base
3- PRETTY_NAME JSON
4- )
5- # nlohmann/json.hpp is vendored in include/nlohmann/ (MIT licensed, single-header)
6- # so no external dependency is needed - icy_add_module already adds our include dir.
1+ if (USE_SYSTEM_DEPS)
2+ icy_add_module (json
3+ DEPENDS base
4+ PACKAGES nlohmann_json::nlohmann_json
5+ PRETTY_NAME JSON
6+ )
7+ else ()
8+ icy_add_module (json
9+ DEPENDS base
10+ PRETTY_NAME JSON
11+ )
12+ target_include_directories (json
13+ PUBLIC
14+ $<BUILD_INTERFACE :${CMAKE_CURRENT_SOURCE_DIR} /vendor >
15+ )
16+ install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /vendor/"
17+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
18+ COMPONENT dev
19+ )
20+ endif ()
File renamed without changes.
You can’t perform that action at this time.
0 commit comments