Add options to link against external JSON libraries (#91)
Add options to link against external JSON libraries This adds two options to the CMake config: `CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE` and `CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE` If either of these is set, instead of using the json submodule, the build will be configured by using `find_package()` and linking against the specified JSON library.
This commit is contained in:
@@ -17,3 +17,9 @@ include(CMakeFindDependencyMacro)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@CPPDAP_TARGETS_EXPORT_NAME@.cmake")
|
||||
check_required_components("@CPPDAP_TARGET_NAME@")
|
||||
|
||||
if ( @CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE@ )
|
||||
find_dependency(nlohmann_json CONFIG)
|
||||
elseif( @CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE@ )
|
||||
find_dependency(RapidJSON CONFIG)
|
||||
endif()
|
||||
Reference in New Issue
Block a user