cmake: fix package config to deal with versioning and namespaces
This commit is contained in:
parent
e184b6ecf2
commit
1729db85c1
2 changed files with 12 additions and 7 deletions
|
|
@ -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})
|
||||
Loading…
Add table
Add a link
Reference in a new issue