diff --git a/CMLibCotire.cmake b/CMLibCotire.cmake index 8d5b68a..af483ce 100644 --- a/CMLibCotire.cmake +++ b/CMLibCotire.cmake @@ -1,4 +1,4 @@ -include(cotire) +include(cotire OPTIONAL) if(COMMAND cotire) option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" OFF) diff --git a/thirdparty/cotire.cmake b/thirdparty/cotire.cmake index 18b55d8..2f970ca 100644 --- a/thirdparty/cotire.cmake +++ b/thirdparty/cotire.cmake @@ -640,6 +640,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu endforeach() list (REMOVE_DUPLICATES _includeDirs) list (REMOVE_DUPLICATES _systemIncludeDirs) + list (REMOVE_ITEM _systemIncludeDirs "/usr/include") if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) endif()