summaryrefslogtreecommitdiff
path: root/pstl
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-01-16 06:07:13 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-01-17 20:04:46 +0000
commitc90d136be4e055f1b409f38706d0fe3e2211af08 (patch)
tree6d39c15304e0a2fceccb5153e6ddc8d34f8b65bd /pstl
parente5c944b47cb8da5dbf93b31912f94d34ef4aa472 (diff)
downloadllvm-c90d136be4e055f1b409f38706d0fe3e2211af08.tar.gz
[pstl][cmake] Use `GNUInstallDirs` to support custom installation dirs
I am breaking apart D99484 so the cause of build failures is easier to understand. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D117418
Diffstat (limited to 'pstl')
-rw-r--r--pstl/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt
index 181f1164cf45..8784eb07b574 100644
--- a/pstl/CMakeLists.txt
+++ b/pstl/CMakeLists.txt
@@ -7,6 +7,8 @@
#===----------------------------------------------------------------------===##
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
string(REGEX REPLACE "#define _PSTL_VERSION (.*)$" "\\1" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}")
@@ -90,10 +92,10 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake"
DESTINATION lib/cmake/ParallelSTL)
install(DIRECTORY include/
- DESTINATION include
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
PATTERN "*.in" EXCLUDE)
install(FILES "${PSTL_CONFIG_SITE_PATH}"
- DESTINATION include)
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
add_custom_target(install-pstl
COMMAND "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" -DCOMPONENT=ParallelSTL)