diff --git a/autobuild.xml b/autobuild.xml index 5d3f1a881..880176e81 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1933,38 +1933,6 @@ version 7.11.1.297294 - modernjson - - copyright - Copyright (c) 2013-2018 Niels Lohmann - description - JSON for Modern C++ - license - MIT - license_file - LICENSES/modernjson.txt - name - modernjson - platforms - - common - - archive - - hash - 6f11eca7e2a6ca61f9217e949a64f026 - hash_algorithm - md5 - url - https://depot.alchemyviewer.org/pub/common/lib/modernjson-3.2.0-common-201809210551.tar.bz2 - - name - common - - - version - 3.2.0 - nvapi copyright diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 8202868a1..cfd982f96 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -50,7 +50,6 @@ set(cmake_SOURCE_FILES GooglePerfTools.cmake Hunspell.cmake JPEG.cmake - Json.cmake LLAddBuildTest.cmake LLAppearance.cmake LLAudio.cmake diff --git a/indra/deps/CMakeLists.txt b/indra/deps/CMakeLists.txt index fb2ed3050..af512a87b 100644 --- a/indra/deps/CMakeLists.txt +++ b/indra/deps/CMakeLists.txt @@ -15,6 +15,11 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 6.1.2 ) +FetchContent_Declare( + nlohmann_json + GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG v3.7.3 + ) FetchContent_Declare( absl GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git @@ -44,5 +49,14 @@ if(WINDOWS) FetchContent_MakeAvailable(fmt) endif() +# Typically you don't care so much for a third party library's tests to be +# run from your own project's code. +set(JSON_BuildTests OFF CACHE INTERNAL "") + +# If you only include this third party in PRIVATE source files, you do not +# need to install it when your main project gets installed. +set(JSON_Install OFF CACHE INTERNAL "") +FetchContent_MakeAvailable(nlohmann_json) + unset(CMAKE_FOLDER) unset(CMAKE_POSITION_INDEPENDENT_CODE) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 9baf87d9d..1d9df704e 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -12,7 +12,6 @@ include(Linking) include(Boost) include(OpenSSL) include(LLSharedLibs) -include(Json) include(Copy3rdPartyLibs) include(ZLIB) include(URIPARSER) @@ -300,6 +299,7 @@ target_link_libraries( ${Boost_SYSTEM_LIBRARY} ${CORESERVICES_LIBRARY} ${URIPARSER_LIBRARY} + nlohmann_json::nlohmann_json ${RT_LIBRARY} ) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0d25be520..77e370f81 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -18,7 +18,6 @@ include(FMODSTUDIO) include(GeneratePrecompiledHeader) include(GLOD) include(Hunspell) -include(Json) include(LLAddBuildTest) include(LLAppearance) include(LLAudio) @@ -63,7 +62,6 @@ include_directories( ${STATEMACHINE_INCLUDE_DIRS} ${DBUSGLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} - ${JSON_INCLUDE_DIR} ${GLOD_INCLUDE_DIR} ${LLAUDIO_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} @@ -1710,6 +1708,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLAPPEARANCE_LIBRARIES} absl::flat_hash_map absl::node_hash_map + nlohmann_json::nlohmann_json ${FMT_LIBRARY} )