Skip to content

Commit d9234de

Browse files
authored
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.
1 parent 9c3fd01 commit d9234de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@ if (SPIRV_HEADERS_ENABLE_INSTALL)
8989
set(namespace "${PROJECT_NAME}::")
9090

9191
include(CMakePackageConfigHelpers)
92+
93+
if (NOT CMAKE_VERSION VERSION_LESS 3.14)
94+
set(arch_independent_str ARCH_INDEPENDENT)
95+
endif()
9296
write_basic_package_version_file(
9397
"${version_config}"
9498
COMPATIBILITY SameMajorVersion
99+
${arch_independent_str}
95100
)
96101

97102
configure_package_config_file(

0 commit comments

Comments
 (0)