diff options
author | Gustavo Alvarez <462213+sl1pkn07@users.noreply.github.com> | 2021-10-19 00:14:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 23:14:52 +0100 |
commit | 1fc6fc181cdd1935ac51658f8fb731db59a9c1a4 (patch) | |
tree | 793fe6ac512968ff1d6a0748fe9118fd39a768ae | |
parent | 03162a6f8b0aabebcaea0e9c29a1bcc35820dad0 (diff) | |
download | OpenCL-Headers-1fc6fc181cdd1935ac51658f8fb731db59a9c1a4.tar.gz |
If change the include path destination when run cmake configure with `DCMAKE_INSTALL_INCLUDEDIR`, the .cmake generated still point to hardcoded path `include`. this fix it (#178)
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be11ea..ed62417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,13 +6,15 @@ project(OpenCLHeaders # https://stackoverflow.com/questions/43379311/why-does-project-affect-cmakes-opinion-on-cmake-sizeof-void-p ) +include(GNUInstallDirs) + add_library(Headers INTERFACE) target_include_directories(Headers SYSTEM BEFORE INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> - $<INSTALL_INTERFACE:include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) install( @@ -20,8 +22,6 @@ install( EXPORT OpenCLHeadersTargets ) -include(GNUInstallDirs) - install( DIRECTORY CL DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |