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:
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt13
1 files changed, 3 insertions, 10 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index ab90344..fe4eed9 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -1,4 +1,3 @@
-
# Add include folders to the library and targets that consume it
# the SYSTEM keyword suppresses warnings for users of the library
#
@@ -7,14 +6,8 @@
#
# IE:
# #include <gsl/gsl>
-if(GSL_STANDALONE_PROJECT)
- target_include_directories(GSL INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
- )
+if(PROJECT_IS_TOP_LEVEL)
+ target_include_directories(GSL INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
else()
- target_include_directories(GSL SYSTEM INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
- )
+ target_include_directories(GSL SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
endif()