cmake: fix package config to deal with versioning and namespaces

This commit is contained in:
Chuck Atkins
2018-09-26 13:08:49 -04:00
parent e184b6ecf2
commit 1729db85c1
2 changed files with 12 additions and 7 deletions

View File

@@ -86,10 +86,10 @@ include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE} COMPATIBILITY SameMajorVersion
)
configure_package_config_file(
configure_file(
${NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE}
${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE}
INSTALL_DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
@ONLY
)
install(
@@ -121,4 +121,3 @@ install(
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
)
export(PACKAGE ${PROJECT_NAME})