From ff5df6b3ca3b4bc238efed94d49667bda4ce6ec0 Mon Sep 17 00:00:00 2001 From: JsonCpp Upstream <kwrobot@kitware.com> Date: Thu, 20 Dec 2018 17:47:44 -0500 Subject: [PATCH] jsoncpp 2018-12-20 (9ab05686) Code extracted from: https://gitlab.kitware.com/third-party/jsoncpp.git at commit 9ab05686df1d3a72fccf409200c2eee88e97d9d6 (for/vtk-20181227-1.8.4). --- CMakeLists.txt | 22 ++++++++++------------ json/json-forwards.h | 2 ++ json/json.h | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 945b87755ae..64cc1d9875d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,26 +14,24 @@ configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/json/vtkjsoncpp_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/json/vtkjsoncpp_config.h") -vtk_add_library(vtkjsoncpp ${sources} ${headers}) - -if (NOT VTK_INSTALL_NO_DEVELOPMENT) - install(FILES - ${headers} - DESTINATION "${VTK_INSTALL_INCLUDE_DIR}/vtkjsoncpp/json" - COMPONENT Development) -endif() - +vtk_module_add_module(VTK::jsoncpp + SOURCES ${sources} + HEADERS ${headers} + HEADERS_SUBDIR vtkjsoncpp/json) if (VTK_REQUIRE_LARGE_FILE_SUPPORT) - target_compile_definitions(vtkjsoncpp + target_compile_definitions(jsoncpp PRIVATE _LARGEFILE_SOURCE _LARGEFILE64_SOURCE _LARGE_FILES _FILE_OFFSET_BITS=64) endif () -target_include_directories(vtkjsoncpp +target_include_directories(jsoncpp PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/json>") -set_target_properties(vtkjsoncpp +target_compile_features(jsoncpp + PUBLIC + cxx_std_11) +set_target_properties(jsoncpp PROPERTIES DEFINE_SYMBOL JSON_DLL_BUILD) diff --git a/json/json-forwards.h b/json/json-forwards.h index 3dc2c6ef598..3c98214032b 100644 --- a/json/json-forwards.h +++ b/json/json-forwards.h @@ -125,6 +125,8 @@ license you like. #endif #endif +#include "vtkjsoncpp_config.h" + #ifdef JSON_IN_CPPTL #define JSON_API CPPTL_API #elif defined(JSON_DLL_BUILD) diff --git a/json/json.h b/json/json.h index 7ee83de7a67..990f16d3157 100644 --- a/json/json.h +++ b/json/json.h @@ -158,6 +158,8 @@ license you like. #endif #endif +#include "vtkjsoncpp_config.h" + #ifdef JSON_IN_CPPTL #define JSON_API CPPTL_API #elif defined(JSON_DLL_BUILD) -- GitLab