From 0a31a14d0939f6cb1f6b92bb73429b9165a1b0bc Mon Sep 17 00:00:00 2001 From: Stefan Reinhold Date: Tue, 17 Jul 2018 11:56:38 +0200 Subject: [PATCH] Fix INSTALL_INTERFACE for exported target CMake war reporting: 'Target "GSL" INTERFACE_SOURCES property contains path: "..." which is prefixed in the source directory'. CMake was confused because the $ had linebreaks in it. Putting everything in one line fixed the issue. --- CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1693069..f9b0454 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,12 +55,8 @@ target_compile_definitions(GSL INTERFACE # add include folders to the library and targets that consume it target_include_directories(GSL INTERFACE - $ - $ + $ + $ ) if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9)) @@ -79,9 +75,7 @@ if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9)) endif() install(TARGETS GSL EXPORT GSLConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install( DIRECTORY include/gsl