Merge pull request #1746 from uhoreg/cmake_arch_indep
make CMake's version config file architecture-independent
This commit is contained in:
commit
be137609df
2 changed files with 27 additions and 2 deletions
|
|
@ -89,8 +89,13 @@ endif()
|
|||
## install header files, generate and install cmake config files for find_package()
|
||||
##
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE} COMPATIBILITY SameMajorVersion
|
||||
# use a custom package version config file instead of
|
||||
# write_basic_package_version_file to ensure that it's architecture-independent
|
||||
# https://github.com/nlohmann/json/issues/1697
|
||||
configure_file(
|
||||
"cmake/nlohmann_jsonConfigVersion.cmake.in"
|
||||
${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE}
|
||||
@ONLY
|
||||
)
|
||||
configure_file(
|
||||
${NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue