diff options
author | Juan Ramos <[email protected]> | 2023-07-10 11:03:52 -0600 |
---|---|---|
committer | Juan Ramos <[email protected]> | 2023-07-10 13:02:41 -0600 |
commit | 2565ffa31ea67650f95f65347ed8f5917c651fac (patch) | |
tree | b7a85c80528b6dffb33a4a8c63728a2b93f8344d | |
parent | 485c0395ad85bcefe7aed17d23362d93f61f942d (diff) | |
download | Vulkan-Headers-2565ffa31ea67650f95f65347ed8f5917c651fac.tar.gz Vulkan-Headers-2565ffa31ea67650f95f65347ed8f5917c651fac.zip |
cmake: Use share instead of DATADIR for CMake config files
See the following discussion for context:
https://discourse.cmake.org/t/what-should-the-destination-be-for-a-header-only-librarys-cmake-config-file/8473/3
TLDR: `DATADIR` can be `share` but it doesn't have to be. It can
be changed by the user.
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 28b8caf..b3db540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,12 +68,10 @@ if (PROJECT_IS_TOP_LEVEL) set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers") - set(cmake_install_dir "${CMAKE_INSTALL_DATADIR}/cmake/VulkanHeaders") - install(TARGETS Vulkan-Headers EXPORT VulkanHeadersConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(EXPORT VulkanHeadersConfig NAMESPACE "Vulkan::" DESTINATION "${cmake_install_dir}") + install(EXPORT VulkanHeadersConfig NAMESPACE "Vulkan::" DESTINATION "share/cmake/VulkanHeaders") set(version_config "${CMAKE_CURRENT_BINARY_DIR}/generated/VulkanHeadersConfigVersion.cmake") write_basic_package_version_file("${version_config}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) - install(FILES "${version_config}" DESTINATION "${cmake_install_dir}") + install(FILES "${version_config}" DESTINATION "share/cmake/VulkanHeaders") endif() |