diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-01-16 08:48:30 +0300 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-01-16 08:48:30 +0300 |
commit | da77db58d7629a3bfea1a0053aa9c29764b0bc2b (patch) | |
tree | e295b677ba30783720a7771f6b090b1f2501fa59 /polly | |
parent | 4a678f8072004eff9214c1a4e1836a14abb69535 (diff) |
Revert "[cmake] Use `GNUInstallDirs` to support custom installation dirs."
https://lab.llvm.org/buildbot/#/builders/46/builds/21146 Still have
this odd error, not sure how to reproduce, so I will just try breaking
up my patch.
This reverts commit 4a678f8072004eff9214c1a4e1836a14abb69535.
Diffstat (limited to 'polly')
-rw-r--r-- | polly/CMakeLists.txt | 6 | ||||
-rw-r--r-- | polly/cmake/CMakeLists.txt | 20 | ||||
-rw-r--r-- | polly/lib/External/CMakeLists.txt | 2 |
3 files changed, 12 insertions, 16 deletions
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt index d6bcc8f7f285..fb62dbd3a09b 100644 --- a/polly/CMakeLists.txt +++ b/polly/CMakeLists.txt @@ -1,5 +1,3 @@ -include(GNUInstallDirs) - # Check if this is a in tree build. if (NOT DEFINED LLVM_MAIN_SRC_DIR) project(Polly) @@ -126,13 +124,13 @@ include_directories( if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(DIRECTORY include/ - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + DESTINATION include FILES_MATCHING PATTERN "*.h" ) install(DIRECTORY ${POLLY_BINARY_DIR}/include/ - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt index 9b508941a139..524d6069c117 100644 --- a/polly/cmake/CMakeLists.txt +++ b/polly/cmake/CMakeLists.txt @@ -1,6 +1,5 @@ # Keep this in sync with llvm/cmake/CMakeLists.txt! -include(ExtendPath) include(FindPrefixFromConfig) set(LLVM_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") @@ -84,18 +83,17 @@ file(GENERATE # Generate PollyConfig.cmake for the install tree. unset(POLLY_EXPORTS) find_prefix_from_config(POLLY_CONFIG_CODE POLLY_INSTALL_PREFIX "${POLLY_INSTALL_PACKAGE_DIR}") -extend_path(POLLY_CONFIG_LLVM_CMAKE_DIR "\${POLLY_INSTALL_PREFIX}" "${LLVM_INSTALL_PACKAGE_DIR}") -extend_path(POLLY_CONFIG_CMAKE_DIR "\${POLLY_INSTALL_PREFIX}" "${POLLY_INSTALL_PACKAGE_DIR}") -extend_path(POLLY_CONFIG_LIBRARY_DIRS "\${POLLY_INSTALL_PREFIX}" "lib${LLVM_LIBDIR_SUFFIX}") -extend_path(base_includedir "\${POLLY_INSTALL_PREFIX}" "${CMAKE_INSTALL_INCLUDEDIR}") +set(POLLY_CONFIG_LLVM_CMAKE_DIR "\${POLLY_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") +set(POLLY_CONFIG_CMAKE_DIR "\${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}") +set(POLLY_CONFIG_LIBRARY_DIRS "\${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}") if (POLLY_BUNDLED_ISL) set(POLLY_CONFIG_INCLUDE_DIRS - "${base_includedir}" - "${base_includedir}/polly" + "\${POLLY_INSTALL_PREFIX}/include" + "\${POLLY_INSTALL_PREFIX}/include/polly" ) else() set(POLLY_CONFIG_INCLUDE_DIRS - "${base_includedir}" + "\${POLLY_INSTALL_PREFIX}/include" ${ISL_INCLUDE_DIRS} ) endif() @@ -112,12 +110,12 @@ set(POLLY_EXPORTS foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS) get_target_property(tgt_type ${tgt} TYPE) if (tgt_type STREQUAL "EXECUTABLE") - set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/") + set(tgt_prefix "bin/") else() - set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/") + set(tgt_prefix "lib/") endif() - extend_path(tgt_path "\${POLLY_INSTALL_PREFIX}" "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") + set(tgt_path "\${POLLY_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY") set(POLLY_EXPORTS diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt index 2f912e7daeb2..e3a5683fccdc 100644 --- a/polly/lib/External/CMakeLists.txt +++ b/polly/lib/External/CMakeLists.txt @@ -290,7 +290,7 @@ if (POLLY_BUNDLED_ISL) install(DIRECTORY ${ISL_SOURCE_DIR}/include/ ${ISL_BINARY_DIR}/include/ - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/polly" + DESTINATION include/polly FILES_MATCHING PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE |