Commit fba5e448 authored by Max Lyon's avatar Max Lyon
Browse files

Merge branch 'Fix-CMakeLists-GF' into 'master'

Move CMAKE_INSTALL_INCLUDEDIR after inclusion of GNUInstallDirs

See merge request !49
parents 8248e724 f566d92d
Pipeline #12827 passed with stages
in 6 minutes and 25 seconds
...@@ -411,8 +411,6 @@ target_include_directories(CoMISo ...@@ -411,8 +411,6 @@ target_include_directories(CoMISo
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> # TODO: this is dangerous! $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> # TODO: this is dangerous!
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/CoMISo>
) )
target_include_directories(CoMISo PUBLIC "${COMISO_INCLUDE_DIRECTORIES}") target_include_directories(CoMISo PUBLIC "${COMISO_INCLUDE_DIRECTORIES}")
...@@ -582,7 +580,13 @@ if(NOT COMISO_NO_INSTALL) ...@@ -582,7 +580,13 @@ if(NOT COMISO_NO_INSTALL)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
include(GNUInstallDirs) include(GNUInstallDirs)
target_include_directories(CoMISo
PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/CoMISo>
)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/CoMISo) set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/CoMISo)
write_basic_package_version_file( write_basic_package_version_file(
...@@ -602,7 +606,7 @@ if(NOT COMISO_NO_INSTALL) ...@@ -602,7 +606,7 @@ if(NOT COMISO_NO_INSTALL)
# Install Header Files # Install Header Files
install(DIRECTORY . install(DIRECTORY .
DESTINATION include/CoMISo DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CoMISo # include/CoMISo
FILES_MATCHING FILES_MATCHING
PATTERN "*.hh" PATTERN "*.hh"
PATTERN "*T.cc" PATTERN "*T.cc"
...@@ -616,7 +620,7 @@ if(NOT COMISO_NO_INSTALL) ...@@ -616,7 +620,7 @@ if(NOT COMISO_NO_INSTALL)
PATTERN "Debian*" EXCLUDE) PATTERN "Debian*" EXCLUDE)
# Install Config File # Install Config File
install(FILES ${CMAKE_BINARY_DIR}/CoMISo/Config/config.hh install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CoMISo/Config/config.hh
DESTINATION include/CoMISo/Config) DESTINATION include/CoMISo/Config)
# Create export target to reference CoMISo installation # Create export target to reference CoMISo installation
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment