diff --git a/CMakeLists.txt b/CMakeLists.txt index 7daeee8..ec17ee2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,12 +7,12 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11) -target_include_directories(${PROJECT_NAME} INTERFACE - $ - $) +set(SYSTEM_TAG "SYSTEM") # Tests and examples if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) + set(SYSTEM_TAG "") + if(MSVC) add_compile_options(/permissive- /W4) else() @@ -44,6 +44,11 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) add_test(SPSCQueueTest SPSCQueueTest) endif() +target_include_directories(${PROJECT_NAME} ${SYSTEM_TAG} INTERFACE + $ + $) + + # Install include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -81,4 +86,4 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) -endif() \ No newline at end of file +endif()