Commit 2f0435f390a2e51b6d0d7d9450b6528080dc81a5
Committed by
GitHub
1 parent
4d34311c
only add CONFIGURE_DEPENDS if main project (#633)
- reglobbing of files is confusing, if CLI11 is used as library, as typically the files won't change
Showing
1 changed file
with
1 additions
and
1 deletions
CMakeLists.txt
| @@ -156,7 +156,7 @@ target_include_directories(CLI11 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOU | @@ -156,7 +156,7 @@ target_include_directories(CLI11 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOU | ||
| 156 | 156 | ||
| 157 | # To see in IDE, headers must be listed for target | 157 | # To see in IDE, headers must be listed for target |
| 158 | set(header-patterns "${PROJECT_SOURCE_DIR}/include/CLI/*") | 158 | set(header-patterns "${PROJECT_SOURCE_DIR}/include/CLI/*") |
| 159 | -if(NOT CMAKE_VERSION VERSION_LESS 3.12) | 159 | +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND NOT CMAKE_VERSION VERSION_LESS 3.12) |
| 160 | list(INSERT header-patterns 0 CONFIGURE_DEPENDS) | 160 | list(INSERT header-patterns 0 CONFIGURE_DEPENDS) |
| 161 | endif() | 161 | endif() |
| 162 | 162 |