7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-27 22:16:30 +00:00
kicad/libs/kimath/CMakeLists.txt
John Beard 8fdb6d6e88 Feature: Exact item offset tool
This is a little bit like the bounding hull tool, but the
output is "exact" and it only supports the most common
source items.

By 'exact', this means that rounded corners are real arc
segments rather than polygonal approximations. Obviously,
this is rather tricky in the general case, and especially
for any concave shape or anything with a bezier in it.

Envisioned main uses:

* Creating courtyard and silkscreen offsets in footprints
* Making slots around line or arcs.

The one thing that it does not currently do, but which it might
plausibly do without reimplementing Clipper is convex polygons,
which would bring trapezoidal pad outsets for free. But that
is a stretch goal, and bounding hull can be used.
2024-09-19 06:35:43 +01:00

75 lines
2.0 KiB
CMake

# Add all the warnings to the files
if( COMPILER_SUPPORTS_WARNINGS )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS_CXX}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}")
endif()
set( KIMATH_SRCS
src/bezier_curves.cpp
src/convert_basic_shapes_to_polygon.cpp
src/md5_hash.cpp
src/transform.cpp
src/trigo.cpp
src/geometry/corner_operations.cpp
src/geometry/distribute.cpp
src/geometry/eda_angle.cpp
src/geometry/ellipse.cpp
src/geometry/circle.cpp
src/geometry/convex_hull.cpp
src/geometry/direction_45.cpp
src/geometry/geometry_utils.cpp
src/geometry/half_line.cpp
src/geometry/intersection.cpp
src/geometry/line.cpp
src/geometry/nearest.cpp
src/geometry/oval.cpp
src/geometry/roundrect.cpp
src/geometry/seg.cpp
src/geometry/shape.cpp
src/geometry/shape_arc.cpp
src/geometry/shape_collisions.cpp
src/geometry/shape_compound.cpp
src/geometry/shape_file_io.cpp
src/geometry/shape_line_chain.cpp
src/geometry/shape_poly_set.cpp
src/geometry/shape_rect.cpp
src/geometry/shape_segment.cpp
src/geometry/vector_utils.cpp
src/geometry/shape_utils.cpp
src/geometry/vertex_set.cpp
src/math/vector2.cpp
src/math/util.cpp
)
# Include the other smaller math libraries in this one for convenience
add_library( kimath STATIC
${KIMATH_SRCS}
)
target_link_libraries( kimath
core
clipper
clipper2
othermath
rtree
Boost::headers
${wxWidgets_LIBRARIES} # wxLogDebug, wxASSERT
)
target_include_directories( kimath PUBLIC
${PROJECT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
# This include REALLY shouldn't be here, but shape_arc.h grew a dependency on the units somehow
${CMAKE_SOURCE_DIR}/include
)
target_include_directories( kimath PRIVATE
# This include REALLY shouldn't be here, but shape_arc grew a dependency on the units somehow
${CMAKE_SOURCE_DIR}/include
${wxWidgets_INCLUDE_DIRS}
)