diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f3dd4ab..20644472 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -271,11 +271,20 @@ target_compile_features(Catch2 cxx_variadic_macros ) -target_include_directories(Catch2 - PUBLIC - $ - $ -) + +if (NOT_SUBPROJECT) + target_include_directories(Catch2 + PUBLIC + $ + $ + ) +else() + target_include_directories(Catch2 + SYSTEM PUBLIC + $ + $ + ) +endif() add_library(Catch2WithMain STATIC