diff --git a/autobuild.xml b/autobuild.xml index 034f6fe3ab438ca92d17cb3db3114e6948578364..004eda9e5a73f2b60f04872e3732e9e89256547e 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2090,38 +2090,6 @@ </map> </map> </map> - <key>modernjson</key> - <map> - <key>copyright</key> - <string>Copyright (c) 2013-2019 Niels Lohmann</string> - <key>description</key> - <string>JSON for Modern C++</string> - <key>license</key> - <string>MIT</string> - <key>license_file</key> - <string>LICENSES/modernjson.txt</string> - <key>name</key> - <string>modernjson</string> - <key>platforms</key> - <map> - <key>common</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>fa2eb2ed28bb18730484ed5da29ac9d5</string> - <key>hash_algorithm</key> - <string>md5</string> - <key>url</key> - <string>https://pkg.alchemyviewer.org/repository/autobuild-external/modernjson/common/modernjson-3.7.0.192211123-common-192211123.tar.bz2</string> - </map> - <key>name</key> - <string>common</string> - </map> - </map> - <key>version</key> - <string>3.7.0.192211123</string> - </map> <key>ndPhysicsStub</key> <map> <key>copyright</key> diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 0186e75f226c4caa60237a3a161183a752cbc105..82d1911a7f89e44ed0b79c0f7d66cea345e68500 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -42,7 +42,6 @@ set(cmake_SOURCE_FILES Havok.cmake Hunspell.cmake JPEG.cmake - Json.cmake LLAddBuildTest.cmake LLAppearance.cmake LLAudio.cmake diff --git a/indra/cmake/Json.cmake b/indra/cmake/Json.cmake deleted file mode 100644 index 5c983704763c27dfdd1553b73a273f72ab58187b..0000000000000000000000000000000000000000 --- a/indra/cmake/Json.cmake +++ /dev/null @@ -1,6 +0,0 @@ -# -*- cmake -*- - -include(Prebuilt) - -use_prebuilt_binary(modernjson) -set(JSON_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include") diff --git a/indra/deps/CMakeLists.txt b/indra/deps/CMakeLists.txt index 20bf9e57816870e3fda643717b744d024c019195..764e3a733f57e5d931ff0d64dfc90c8cbfb4de6a 100644 --- a/indra/deps/CMakeLists.txt +++ b/indra/deps/CMakeLists.txt @@ -13,7 +13,12 @@ FetchContent_Declare( FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG f94b7364b9409f05207c3af3fa4666730e11a854 + 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 @@ -42,5 +47,14 @@ endif() #Download the rest of the libraries FetchContent_MakeAvailable(fmt) +# 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 663bfb6354d226306a888626d774614d81c472f3..011bb7f49ce25d5dbaa46d0e49ba29fc67385598 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -13,7 +13,6 @@ include(Linking) include(Boost) include(OpenSSL) include(LLSharedLibs) -include(Json) include(GooglePerfTools) include(Copy3rdPartyLibs) include(ZLIB) @@ -24,7 +23,6 @@ include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLDARWIN_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} - ${JSON_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ${BREAKPAD_INCLUDE_DIRECTORIES} ${URIPARSER_INCLUDE_DIRS} @@ -312,6 +310,7 @@ target_link_libraries( absl::flat_hash_map absl::node_hash_map fmt::fmt + nlohmann_json::nlohmann_json ${RT_LIBRARY} ) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index cb3a51f33835cedd63056f476e438def997fd1c9..e8aa8d0620fbd42705990509f5fc2d14c520d81c 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -13,7 +13,6 @@ include(LLAddBuildTest) include(Python) include(Tut) include(Python) -include(Json) include(NGHTTP2) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) @@ -24,7 +23,6 @@ include_directories( ${LLMATH_INCLUDE_DIRS} ${LLMESSAGE_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} - ${JSON_INCLUDE_DIR} ) include_directories( @@ -218,6 +216,7 @@ endif(USE_PRECOMPILED_HEADERS) target_link_libraries( llmessage + PUBLIC ${LLCOREHTTP_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} @@ -230,6 +229,7 @@ target_link_libraries( ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} + nlohmann_json::nlohmann_json ${RT_LIBRARY} ${PTHREAD_LIBRARY} ) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index db3f49410698d0676ff92610ab21530d338f76d7..721d1cf1cff1f5b2e44abded6f18286946adf00d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -21,7 +21,6 @@ include(GLOD) include(GLEW) include(GooglePerfTools) include(Hunspell) -include(Json) include(LLAppearance) include(LLDarwin) include(LLAudio) @@ -80,7 +79,6 @@ endif(USE_CRASHPAD) include_directories( ${DBUSGLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} - ${JSON_INCLUDE_DIR} ${GLOD_INCLUDE_DIR} ${LLDARWIN_INCLUDE_DIRS} ${LLAUDIO_INCLUDE_DIRS} @@ -2042,6 +2040,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLAPPEARANCE_LIBRARIES} absl::flat_hash_map absl::node_hash_map + nlohmann_json::nlohmann_json ) set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH