Move library includes to main CMake file

Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
This commit is contained in:
Ian McInerney 2020-04-19 01:11:56 +01:00
parent 895f46da8f
commit 7bda8178d1
9 changed files with 12 additions and 24 deletions

View File

@ -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 )

View File

@ -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}
)

View File

@ -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

View File

@ -12,7 +12,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/pcbnew
${CMAKE_SOURCE_DIR}/pcbnew/dialogs
${CMAKE_SOURCE_DIR}/common
${GLM_INCLUDE_DIR}
${INC_AFTER}
)

View File

@ -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}
)

View File

@ -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

View File

@ -4,7 +4,6 @@ if( COMPILER_SUPPORTS_WSHADOW )
endif()
include_directories(
${GLM_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/3d-viewer
)

View File

@ -42,5 +42,4 @@ target_link_libraries( qa_utils
target_include_directories( qa_utils PUBLIC
include
${Boost_INCLUDE_DIR}
)

View File

@ -43,7 +43,6 @@ 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