diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index 41dbf5a36c..204b69caab 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -13,8 +13,6 @@ include_directories( 3d_viewer ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include/gal/opengl - ${GLEW_INCLUDE_DIR} - ${GLM_INCLUDE_DIR} ${INC_AFTER} ) @@ -108,7 +106,7 @@ add_dependencies( 3d-viewer pcbcommon ) target_link_libraries( 3d-viewer gal kimath - ${Boost_} + ${Boost_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} kicad_3dsg ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58b4c93a4d..c506f818ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -642,6 +642,7 @@ find_package( OpenGL REQUIRED ) if( NOT GLEW_FOUND ) find_package( GLEW REQUIRED ) check_find_package_result( GLEW_FOUND "GLEW" ) + include_directories( SYSTEM ${GLEW_INCLUDE_DIR} ) endif() # @@ -649,21 +650,27 @@ endif() # find_package( GLM 0.9.5.1 REQUIRED ) add_definitions( -DGLM_FORCE_CTOR_INIT ) +include_directories( SYSTEM ${GLM_INCLUDE_DIR} ) # # Find CURL library, required # find_package( CURL REQUIRED ) +include_directories( SYSTEM ${CURL_INCLUDE_DIRS} ) # # Find Cairo library, required # find_package( Cairo 1.12 REQUIRED ) +include_directories( SYSTEM ${CAIRO_INCLUDE_DIR} ) + find_package( Pixman 0.30 REQUIRED ) +include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} ) # # Find Boost headers, required. find_package( Boost 1.59.0 REQUIRED ) +include_directories( SYSTEM ${Boost_INCLUDE_DIR} ) # Include MinGW resource compiler. include( MinGWResourceCompiler ) @@ -683,6 +690,7 @@ if( KICAD_USE_OCE ) set( OCC_LIBRARIES TKBinXCAF TKPCAF TKSTEP TKXDESTEP TKIGES TKXDEIGES ) find_package( OCE 0.18 REQUIRED ${OCC_LIBRARIES} ) + include_directories( SYSTEM ${OCE_INCLUDE_DIRS} ) elseif( KICAD_USE_OCC ) find_package(OpenCASCADE) @@ -715,7 +723,6 @@ set( INC_BEFORE ) set( INC_AFTER - ${Boost_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index b7df8e01d9..af0ccfae59 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -10,22 +10,15 @@ include_directories( ./dialogs ./widgets ./dialog_about - ${CAIRO_INCLUDE_DIR} - ${PIXMAN_INCLUDE_DIR} - ${GLEW_INCLUDE_DIR} - ${GLM_INCLUDE_DIR} - ${CURL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/3d-viewer ${CMAKE_SOURCE_DIR}/pcbnew ${INC_AFTER} - ${OCE_INCLUDE_DIRS} - ${OCC_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} ) if( NOT APPLE ) # windows and linux use openssl under curl find_package( OpenSSL REQUIRED ) + include_directories( SYSTEM ${OPENSSL_INCLUDE_DIR} ) endif() set( GAL_SRCS diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 71cb8fa651..457c81ddf0 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -12,7 +12,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/pcbnew ${CMAKE_SOURCE_DIR}/pcbnew/dialogs ${CMAKE_SOURCE_DIR}/common - ${GLM_INCLUDE_DIR} ${INC_AFTER} ) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d99c1fb290..69bf802071 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -44,7 +44,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/common/dialogs ./exporters ${CMAKE_SOURCE_DIR}/utils/idftools - ${GLM_INCLUDE_DIR} ./specctra_import_export ${INC_AFTER} ) diff --git a/plugins/3d/oce/CMakeLists.txt b/plugins/3d/oce/CMakeLists.txt index fe35c81ac9..37ca0a6a6e 100644 --- a/plugins/3d/oce/CMakeLists.txt +++ b/plugins/3d/oce/CMakeLists.txt @@ -12,11 +12,6 @@ # export WXTRACE="PLUGIN_OCE" # -include_directories( SYSTEM - ${OCE_INCLUDE_DIRS} - ${OCC_INCLUDE_DIR} -) - add_library( s3d_plugin_oce MODULE oce.cpp loadmodel.cpp diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 49e049e961..720348efc5 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -4,7 +4,6 @@ if( COMPILER_SUPPORTS_WSHADOW ) endif() include_directories( - ${GLM_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/3d-viewer ) diff --git a/qa/qa_utils/CMakeLists.txt b/qa/qa_utils/CMakeLists.txt index 29d2b23add..5526e89988 100644 --- a/qa/qa_utils/CMakeLists.txt +++ b/qa/qa_utils/CMakeLists.txt @@ -42,5 +42,4 @@ target_link_libraries( qa_utils target_include_directories( qa_utils PUBLIC include - ${Boost_INCLUDE_DIR} -) \ No newline at end of file +) diff --git a/qa/unit_test_utils/CMakeLists.txt b/qa/unit_test_utils/CMakeLists.txt index 80ca2f9dbd..2bd0aa35c6 100644 --- a/qa/unit_test_utils/CMakeLists.txt +++ b/qa/unit_test_utils/CMakeLists.txt @@ -43,9 +43,8 @@ target_link_libraries( unit_test_utils PUBLIC target_include_directories( unit_test_utils PUBLIC include - ${Boost_INCLUDE_DIR} ) target_compile_definitions( unit_test_utils PUBLIC BOOST_TEST_DYN_LINK -) \ No newline at end of file +)