Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinhold <sre@informatik.uni-kiel.de>2018-07-17 12:56:38 +0300
committerStefan Reinhold <sre@informatik.uni-kiel.de>2018-07-17 12:56:38 +0300
commit0a31a14d0939f6cb1f6b92bb73429b9165a1b0bc (patch)
tree4337813934500b22a99432e9be351602a0353258 /CMakeLists.txt
parent030454e3e9b6cbb46e6be5bb31c730bca715b1b0 (diff)
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 $<BUILD_INTERFACE: ...> had linebreaks in it. Putting everything in one line fixed the issue.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files 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
- $<BUILD_INTERFACE:
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- >
- $<INSTALL_INTERFACE:
- include
- >
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>
)
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