Added ARCH_INDEPENDENT parameter to write_basic_package_version_file().

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
Vitaly Zaitsev 2020-06-06 20:42:51 +02:00
parent 0f6dbc9e29
commit cfe9baf02e
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

View File

@ -97,10 +97,18 @@ export(TARGETS GSL NAMESPACE Microsoft.GSL:: FILE Microsoft.GSLConfig.cmake)
# last project() command. The version's compatibility is set between all # last project() command. The version's compatibility is set between all
# minor versions (as it was in prev. GSL releases). # minor versions (as it was in prev. GSL releases).
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
write_basic_package_version_file( if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake write_basic_package_version_file(
COMPATIBILITY SameMajorVersion ${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake
) COMPATIBILITY SameMajorVersion
)
else()
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake
COMPATIBILITY SameMajorVersion
ARCH_INDEPENDENT
)
endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Microsoft.GSL) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Microsoft.GSL)
# Add Microsoft.GSL::GSL alias for GSL so that dependents can be agnostic about # Add Microsoft.GSL::GSL alias for GSL so that dependents can be agnostic about