From a53777907bf89c5f65b8e2988dcbf77d959ec46a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 11 Mar 2022 22:30:42 -0600 Subject: [PATCH] [ox] Bundle jsoncpp under deps (synced from 5a4b539ac1d57cdf9adb7902c95732c50293a472) --- CMakeLists.txt | 2 ++ deps/jsoncpp/CMakeLists.txt | 8 ++++---- src/ox/oc/CMakeLists.txt | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be2e3b221..69c4a6d2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,4 +78,6 @@ include_directories("src") install(FILES OxConfig.cmake DESTINATION lib/ox) +include_directories(deps/jsoncpp/include) +add_subdirectory(deps/jsoncpp) add_subdirectory(src) diff --git a/deps/jsoncpp/CMakeLists.txt b/deps/jsoncpp/CMakeLists.txt index 2841277c0..334dcb7ab 100644 --- a/deps/jsoncpp/CMakeLists.txt +++ b/deps/jsoncpp/CMakeLists.txt @@ -81,17 +81,17 @@ set(PROJECT_SOVERSION 25) include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInSourceBuilds.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInBuildInstalls.cmake) -option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" ON) -option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON) +option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF) +option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF) option(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF) option(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C and ISO C++" ON) option(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON) option(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON) option(JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF) option(JSONCPP_STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" OFF) -option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON) +option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF) option(BUILD_STATIC_LIBS "Build jsoncpp_lib as a static library." ON) -option(BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." ON) +option(BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." OFF) # Adhere to GNU filesystem layout conventions include(GNUInstallDirs) diff --git a/src/ox/oc/CMakeLists.txt b/src/ox/oc/CMakeLists.txt index 6c8aa6271..66d459a8b 100644 --- a/src/ox/oc/CMakeLists.txt +++ b/src/ox/oc/CMakeLists.txt @@ -4,8 +4,6 @@ add_library( write.cpp ) -find_package(jsoncpp REQUIRED) - if(NOT MSVC) target_compile_options(OxOrganicClaw PRIVATE -Wsign-conversion) endif() @@ -13,7 +11,7 @@ endif() target_link_libraries( OxOrganicClaw PUBLIC OxModel - jsoncpp::jsoncpp + jsoncpp ) set_property(