Make GSL includes based on CMAKE_INSTALL_INCLUDEDIR

This is to avoid inconsistencies with the `install`
command which specifies this as the destination for includes.
This commit is contained in:
Hannes Steffenhagen 2020-02-08 12:49:43 +00:00
parent 0551cad467
commit ebe8844344

View File

@ -58,12 +58,12 @@ target_compile_definitions(GSL INTERFACE
if(GSL_STANDALONE_PROJECT) if(GSL_STANDALONE_PROJECT)
target_include_directories(GSL INTERFACE target_include_directories(GSL INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
else() else()
target_include_directories(GSL SYSTEM INTERFACE target_include_directories(GSL SYSTEM INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
endif() endif()