Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Support user defined CMAKE_INSTALL_INCLUDEDIR values
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Dec 20, 2021
1 parent 65d6b98 commit 985053d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cmake/CubInstallRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ include(GNUInstallDirs)
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)

install(DIRECTORY "${CUB_SOURCE_DIR}/cub"
TYPE INCLUDE
DESTINATION include/${CUB_INSTALL_HEADER_INFIX}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING
PATTERN "*.cuh"
)
Expand All @@ -24,5 +23,5 @@ install(DIRECTORY "${CUB_SOURCE_DIR}/cub/cmake/"
configure_file("${CUB_SOURCE_DIR}/cub/cmake/cub-header-search.cmake.in"
"${CUB_BINARY_DIR}/cub/cmake/cub-header-search.cmake"
@ONLY)
install(FILE "${CUB_BINARY_DIR}/cub/cmake/cub-header-search.cmake"
install(FILES "${CUB_BINARY_DIR}/cub/cmake/cub-header-search.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cub")
4 changes: 2 additions & 2 deletions cub/cmake/cub-header-search.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ unset(_CUB_VERSION_INCLUDE_DIR CACHE) # Clear old result to force search
find_path(_CUB_VERSION_INCLUDE_DIR cub/version.cuh
NO_DEFAULT_PATH # Only search explicit paths below:
PATHS
${CMAKE_CURRENT_LIST_DIR}/../../../include/@CUB_INSTALL_HEADER_INFIX@ # Install tree
${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_INCLUDEDIR@ # Install tree
)
set_property(CACHE _CUB_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL)
set_property(CACHE _CUB_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL)

0 comments on commit 985053d

Please sign in to comment.