Browse Source

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.
pull/13/head
John Beard 7 years ago
committed by Seth Hillbrand
parent
commit
e6a6266f3d
  1. 2
      3d-viewer/CMakeLists.txt
  2. 2
      bitmap2component/CMakeLists.txt
  3. 11
      common/CMakeLists.txt
  4. 4
      cvpcb/CMakeLists.txt
  5. 4
      eeschema/CMakeLists.txt
  6. 4
      gerbview/CMakeLists.txt
  7. 3
      include/geometry/shape_line_chain.h
  8. 2
      kicad/CMakeLists.txt
  9. 3
      pagelayout_editor/CMakeLists.txt
  10. 2
      pcb_calculator/CMakeLists.txt
  11. 2
      pcbnew/CMakeLists.txt
  12. 1
      pcbnew/connectivity/CMakeLists.txt
  13. 1
      pcbnew/router/CMakeLists.txt
  14. 3
      polygon/CMakeLists.txt
  15. 0
      polygon/include/SutherlandHodgmanClipPoly.h
  16. 0
      polygon/include/clipper.hpp
  17. 0
      polygon/include/math_for_graphics.h
  18. 0
      polygon/include/polygon_test_point_inside.h
  19. 2
      qa/common/CMakeLists.txt
  20. 2
      qa/common_tools/CMakeLists.txt
  21. 5
      qa/pcb_test_window/CMakeLists.txt
  22. 1
      qa/pcbnew/CMakeLists.txt
  23. 1
      qa/pcbnew_tools/CMakeLists.txt
  24. 2
      qa/pcbnew_utils/CMakeLists.txt
  25. 1
      tools/CMakeLists.txt

2
3d-viewer/CMakeLists.txt

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

2
bitmap2component/CMakeLists.txt

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

11
common/CMakeLists.txt

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

4
cvpcb/CMakeLists.txt

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

4
eeschema/CMakeLists.txt

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

4
gerbview/CMakeLists.txt

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

3
include/geometry/shape_line_chain.h

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

2
kicad/CMakeLists.txt

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

3
pagelayout_editor/CMakeLists.txt

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

2
pcb_calculator/CMakeLists.txt

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

2
pcbnew/CMakeLists.txt

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

1
pcbnew/connectivity/CMakeLists.txt

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

1
pcbnew/router/CMakeLists.txt

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

3
polygon/CMakeLists.txt

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

0
polygon/SutherlandHodgmanClipPoly.h → polygon/include/SutherlandHodgmanClipPoly.h

0
polygon/clipper.hpp → polygon/include/clipper.hpp

0
polygon/math_for_graphics.h → polygon/include/math_for_graphics.h

0
polygon/polygon_test_point_inside.h → polygon/include/polygon_test_point_inside.h

2
qa/common/CMakeLists.txt

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

2
qa/common_tools/CMakeLists.txt

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

5
qa/pcb_test_window/CMakeLists.txt

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

1
qa/pcbnew/CMakeLists.txt

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

1
qa/pcbnew_tools/CMakeLists.txt

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

2
qa/pcbnew_utils/CMakeLists.txt

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

1
tools/CMakeLists.txt

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

Loading…
Cancel
Save