We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aff5a31 commit 18ff442Copy full SHA for 18ff442
CMakeLists.txt
@@ -57,7 +57,11 @@ endif ()
57
##
58
include(GNUInstallDirs)
59
60
-set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
+if (NOT DEFINED NLOHMANN_JSON_TARGET_NAME)
61
+ # Allow overriding the target name when using FetchContent / add_subdirectory.
62
+ set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
63
+endif()
64
+
65
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}" CACHE INTERNAL "")
66
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
67
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
0 commit comments