diff options
author | Andrea Pappacoda <andrea@pappacoda.it> | 2022-04-07 14:27:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 14:27:01 +0300 |
commit | d9234dee3c8e9f5ee4c5ab4223f9d0e8b725fa6c (patch) | |
tree | ede6ba8e155006714fdae9594ad74a09b5ff9820 | |
parent | 9c3fd01c8a91761b6e4be97ff4f13de76e779128 (diff) |
build: use ARCH_INDEPENDENT if possible
Since this is a header-only library, the CMake Version file should be marked architecture-independent with the ARCH_INDEPENDENT option. As the option has been added in CMake 3.14 and spriv-headers supports CMake 3.0 the option has to be passed only if supported.
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f19390a..147f7ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,9 +89,14 @@ if (SPIRV_HEADERS_ENABLE_INSTALL) set(namespace "${PROJECT_NAME}::") include(CMakePackageConfigHelpers) + + if (NOT CMAKE_VERSION VERSION_LESS 3.14) + set(arch_independent_str ARCH_INDEPENDENT) + endif() write_basic_package_version_file( "${version_config}" COMPATIBILITY SameMajorVersion + ${arch_independent_str} ) configure_package_config_file( |