Build: libpolygon provides its own includes

Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
This commit is contained in:
John Beard 2019-01-31 11:53:01 +00:00 committed by Seth Hillbrand
parent bb2ae8e13b
commit e6a6266f3d
25 changed files with 14 additions and 44 deletions

View File

@ -8,7 +8,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
../include/legacy_wx
../pcbnew
../polygon
3d_canvas
3d_cache
3d_rendering
@ -108,6 +107,7 @@ add_dependencies( 3d-viewer pcbcommon )
target_link_libraries( 3d-viewer
gal
polygon
${Boost_}
${wxWidgets_LIBRARIES}
${OPENGL_LIBRARIES}

View File

@ -6,7 +6,6 @@ endif()
include_directories( BEFORE ${INC_BEFORE} )
include_directories(
../potrace
../polygon
${INC_AFTER}
)
@ -49,7 +48,6 @@ add_executable( bitmap2component WIN32 MACOSX_BUNDLE
target_link_libraries( bitmap2component
common
polygon
gal
${wxWidgets_LIBRARIES}
potrace

View File

@ -17,7 +17,6 @@ include_directories(
${CURL_INCLUDE_DIRS}
../3d-viewer
../pcbnew
../polygon
${INC_AFTER}
${OCE_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
@ -93,10 +92,11 @@ add_library( legacy_wx STATIC ${LEGACY_WX_SRCS} )
target_include_directories( legacy_wx PUBLIC ../include/legacy_wx )
target_include_directories( legacy_gal PUBLIC ../include/legacy_gal )
target_link_libraries( legacy_wx PRIVATE bitmaps )
target_link_libraries( legacy_gal PRIVATE bitmaps )
target_link_libraries( legacy_wx PRIVATE bitmaps polygon )
target_link_libraries( legacy_gal PRIVATE bitmaps polygon )
target_link_libraries( gal
polygon
bitmaps
${GLEW_LIBRARIES}
${CAIRO_LIBRARIES}
@ -423,6 +423,7 @@ add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common version_header )
target_link_libraries( common
bitmaps
polygon
gal
${Boost_LIBRARIES}
${CURL_LIBRARIES}
@ -504,6 +505,10 @@ target_include_directories( pcbcommon PUBLIC
../include/legacy_wx
)
target_link_libraries( pcbcommon PUBLIC
common
)
# auto-generate netlist_lexer.h and netlist_keywords.cpp
make_lexer(

View File

@ -12,7 +12,6 @@ include_directories(
../3d-viewer
../pcbnew
../pcbnew/dialogs
../polygon
../common
${GLM_INCLUDE_DIR}
${INC_AFTER}
@ -146,21 +145,18 @@ target_link_libraries( cvpcb_kiface
pcad2kicadpcb
3d-viewer
common
polygon
gal
legacy_wx
pcbcommon
pcad2kicadpcb
3d-viewer
common
polygon
gal
legacy_wx
pcbcommon
pcad2kicadpcb
3d-viewer
common
polygon
gal
legacy_wx
${wxWidgets_LIBRARIES}

View File

@ -342,19 +342,15 @@ add_library( eeschema_kiface SHARED
)
target_link_libraries( eeschema_kiface
common
polygon
gal
legacy_gal
common
polygon
gal
legacy_gal
common
polygon
gal
legacy_gal
common
polygon
gal
legacy_gal
${wxWidgets_LIBRARIES}

View File

@ -12,7 +12,6 @@ include_directories(
dialogs
../common
../3d-viewer
../polygon
${INC_AFTER}
)
@ -143,15 +142,12 @@ set_target_properties( gerbview_kiface PROPERTIES
)
target_link_libraries( gerbview_kiface
common
polygon
gal
legacy_wx
common
polygon
gal
legacy_wx
common
polygon
gal
legacy_wx
${wxWidgets_LIBRARIES}

View File

@ -34,7 +34,8 @@
#include <math/vector2d.h>
#include <geometry/shape.h>
#include <geometry/seg.h>
#include <../polygon/clipper.hpp>
#include <clipper.hpp>
/**
* Class SHAPE_LINE_CHAIN

View File

@ -71,13 +71,11 @@ if( APPLE )
)
target_link_libraries( kicad
common
polygon
${wxWidgets_LIBRARIES}
)
else()
target_link_libraries( kicad
common
polygon
gal
${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES}

View File

@ -109,15 +109,12 @@ add_library( pl_editor_kiface MODULE
)
target_link_libraries( pl_editor_kiface
common
polygon
gal
legacy_wx
common
polygon
gal
legacy_wx
common
polygon
gal
legacy_wx
${wxWidgets_LIBRARIES}

View File

@ -5,7 +5,6 @@ include_directories(
dialogs
transline
attenuators
../polygon
../common
${INC_AFTER}
)
@ -88,7 +87,6 @@ set_target_properties( pcb_calculator_kiface PROPERTIES
)
target_link_libraries( pcb_calculator_kiface
common
polygon
${wxWidgets_LIBRARIES}
)
set_source_files_properties( pcb_calculator.cpp PROPERTIES

View File

@ -42,7 +42,6 @@ include_directories(
./autorouter
../3d-viewer
../common
../polygon
../common/dialogs
./exporters
../dxflib_qcad
@ -679,7 +678,6 @@ set( PCBNEW_KIFACE_LIBRARIES
pcad2kicadpcb
legacy_wx
common
polygon
gal
lib_dxf
idf3

View File

@ -4,7 +4,6 @@ include_directories(
./
../
../../include
../../polygon
${INC_AFTER}
)

View File

@ -6,7 +6,6 @@ include_directories(
../../include
../../3d-viewer
../../pcbnew
../../polygon
${INC_AFTER}
)

View File

@ -16,3 +16,6 @@ set(POLYGON_SRCS
add_library(polygon STATIC ${POLYGON_SRCS})
target_include_directories( polygon PUBLIC
include
)

View File

@ -62,7 +62,6 @@ set( common_srcs
set( common_libs
common
legacy_gal
polygon
gal
qa_utils
unit_test_utils
@ -89,7 +88,6 @@ include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/pcbnew
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/polygon
${INC_AFTER}
)

View File

@ -41,14 +41,12 @@ add_executable( qa_common_tools
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/polygon
${INC_AFTER}
)
target_link_libraries( qa_common_tools
common
legacy_gal
polygon
gal
qa_utils
${wxWidgets_LIBRARIES}

View File

@ -55,7 +55,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/pcbnew/router
${CMAKE_SOURCE_DIR}/pcbnew/tools
${CMAKE_SOURCE_DIR}/pcbnew/dialogs
${CMAKE_SOURCE_DIR}/polygon
${CMAKE_SOURCE_DIR}/common/geometry
${CMAKE_SOURCE_DIR}/qa/qa_utils
${Boost_INCLUDE_DIR}
@ -63,19 +62,15 @@ include_directories(
)
target_link_libraries( test_window
polygon
pnsrouter
common
pcbcommon
polygon
pnsrouter
common
pcbcommon
polygon
pnsrouter
common
pcbcommon
polygon
pnsrouter
common
pcbcommon

View File

@ -64,7 +64,6 @@ target_link_libraries( qa_pcbnew
common
pcbcommon
legacy_wx
polygon
gal
qa_utils
lib_dxf

View File

@ -52,7 +52,6 @@ target_link_libraries( qa_pcbnew_tools
common
pcbcommon
legacy_wx
polygon
gal
qa_utils
lib_dxf

View File

@ -45,7 +45,6 @@ target_include_directories( qa_pcbnew_utils PUBLIC
# target_include_directories and made PUBLIC)
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/polygon
${CMAKE_SOURCE_DIR}/pcbnew
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/pcbnew/router
@ -65,7 +64,6 @@ target_link_libraries( qa_pcbnew_utils PUBLIC
# common
# pcbcommon
# legacy_wx
# polygon
# gal
# qa_utils
# lib_dxf

View File

@ -14,7 +14,6 @@ add_executable( container_test
)
target_link_libraries( container_test
common
polygon
${wxWidgets_LIBRARIES}
)