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
This commit is contained in:
parent
4ca8ea3637
commit
1c8d71f98a
1 changed files with 2 additions and 2 deletions
|
|
@ -36,8 +36,8 @@ endif()
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
install(DIRECTORY "${CMAKE_CURRENT_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}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan)
|
||||||
|
|
||||||
# uninstall target
|
# uninstall target
|
||||||
if(NOT TARGET uninstall)
|
if(NOT TARGET uninstall)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue