From 3530cdda852bbdf1e52953d246886fe3aae00ccd Mon Sep 17 00:00:00 2001 From: arvindcheru <90783369+arvindcheru@users.noreply.github.com> Date: Mon, 13 Jun 2022 12:17:23 -0400 Subject: [PATCH] sd321110 enhancements (#237) --- CMakeLists.txt | 4 ++-- thrust/CMakeLists.txt | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fabcbb71e..a2cc66053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,7 @@ if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY) PATTERNS "*.h" "*.inl" "*.cuh" "*.hpp" HEADER_LOCATION include/thrust GUARDS SYMLINK WRAPPER - WRAPPER_LOCATIONS rocthrust/include/thrust + WRAPPER_LOCATIONS rocthrust/${CMAKE_INSTALL_INCLUDEDIR}/thrust OUTPUT_LOCATIONS rocthrust/wrapper/include/thrust ) endif( ) @@ -201,7 +201,7 @@ set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # endif() -set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\${CPACK_PACKAGING_INSTALL_PREFIX}" "\${CPACK_PACKAGING_INSTALL_PREFIX}/include") +set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\${CPACK_PACKAGING_INSTALL_PREFIX}" "\${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") rocm_create_package( NAME rocthrust diff --git a/thrust/CMakeLists.txt b/thrust/CMakeLists.txt index 8acd0f61a..27cb27fcd 100644 --- a/thrust/CMakeLists.txt +++ b/thrust/CMakeLists.txt @@ -16,7 +16,7 @@ if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY) rocm_wrap_header_file( "rocthrust_version.hpp" HEADER_LOCATION include/thrust - WRAPPER_LOCATIONS rocthrust/include/thrust + WRAPPER_LOCATIONS rocthrust/${CMAKE_INSTALL_INCLUDEDIR}/thrust OUTPUT_LOCATIONS rocthrust/wrapper/include/thrust ) endif() @@ -27,7 +27,7 @@ target_include_directories(rocthrust INTERFACE $ $ - $ + $ ) target_link_libraries(rocthrust @@ -37,9 +37,6 @@ target_link_libraries(rocthrust # Installation -include(GNUInstallDirs) -set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) - # We need to install headers manually as rocm_install_targets # does not support header-only libraries (INTERFACE targets) rocm_install_targets( @@ -55,7 +52,7 @@ rocm_install( DIRECTORY "./" "${PROJECT_BINARY_DIR}/thrust/include/" - DESTINATION include/thrust + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thrust FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh"