Move CMake configuration section into cmake/json_opts.cmake
This commit is contained in:
parent
e41f668576
commit
4bed5779ba
@ -42,32 +42,6 @@ if (JSON_CI)
|
|||||||
include(ci)
|
include(ci)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
##
|
|
||||||
## CONFIGURATION
|
|
||||||
##
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
|
|
||||||
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}" CACHE INTERNAL "")
|
|
||||||
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
||||||
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
|
||||||
set(NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE "cmake/config.cmake.in")
|
|
||||||
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
|
||||||
set(NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
|
|
||||||
set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
|
|
||||||
set(NLOHMANN_JSON_CMAKE_PROJECT_TARGETS_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Targets.cmake")
|
|
||||||
set(NLOHMANN_JSON_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/pkgconfig")
|
|
||||||
|
|
||||||
if (JSON_MultipleHeaders)
|
|
||||||
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/include/")
|
|
||||||
else()
|
|
||||||
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/single_include/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (JSON_SystemInclude)
|
|
||||||
set(NLOHMANN_JSON_SYSTEM_INCLUDE "SYSTEM")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## TARGET
|
## TARGET
|
||||||
## create target and add include path
|
## create target and add include path
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# test options
|
# test options
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user