diff options
author | Nuno Subtil <[email protected]> | 2018-11-20 19:05:58 -0800 |
---|---|---|
committer | Mike Weiblen <[email protected]> | 2018-12-03 11:02:49 -0700 |
commit | 1c8d71f98a3d7d857896cdbdda229d28dd3139a4 (patch) | |
tree | 879c75d02b81fe5467aef44ad6788374f12402e2 /CMakeLists.txt | |
parent | 4ca8ea36379b1be079d7f4b80c942af4c3172534 (diff) | |
download | Vulkan-Headers-1c8d71f98a3d7d857896cdbdda229d28dd3139a4.tar.gz Vulkan-Headers-1c8d71f98a3d7d857896cdbdda229d28dd3139a4.zip |
build: Fix install target path
Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR when defining
the path for the source files to be installed.
CMAKE_SOURCE_DIR always points at the directory containing the root
CMakeLists.txt, while CMAKE_CURRENT_SOURCE_DIR points at the directory
containing the current project's CMakeLists.txt. These are normally
identical, except when another CMake project includes this project via
add_subdirectory() --- in that case, CMAKE_CURRENT_SOURCE_DIR is the
right variable to use when composing paths to files within the current
project tree.
Change-Id: I4bdcc3bf538e96c43ae5f4ff6758cf45992442e0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5529e60..1c1d81f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,8 +36,8 @@ endif() # -------------------------------------------------------------------------------------------------------------------------------- -install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -install(DIRECTORY "${CMAKE_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan) +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan) # uninstall target if(NOT TARGET uninstall) |