2023-03-10 13:46:59 +00:00
|
|
|
# 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()
|
|
|
|
|
2020-01-07 17:12:59 +00:00
|
|
|
set( KIMATH_SRCS
|
|
|
|
src/bezier_curves.cpp
|
|
|
|
src/convert_basic_shapes_to_polygon.cpp
|
|
|
|
src/md5_hash.cpp
|
|
|
|
src/trigo.cpp
|
|
|
|
|
2023-07-02 17:59:04 +00:00
|
|
|
src/geometry/chamfer.cpp
|
2022-01-15 01:12:24 +00:00
|
|
|
src/geometry/eda_angle.cpp
|
2022-12-20 22:21:20 +00:00
|
|
|
src/geometry/ellipse.cpp
|
2021-01-03 01:21:20 +00:00
|
|
|
src/geometry/circle.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/geometry/convex_hull.cpp
|
2019-05-17 00:13:21 +00:00
|
|
|
src/geometry/direction_45.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/geometry/geometry_utils.cpp
|
|
|
|
src/geometry/seg.cpp
|
|
|
|
src/geometry/shape.cpp
|
|
|
|
src/geometry/shape_arc.cpp
|
|
|
|
src/geometry/shape_collisions.cpp
|
|
|
|
src/geometry/shape_file_io.cpp
|
|
|
|
src/geometry/shape_line_chain.cpp
|
|
|
|
src/geometry/shape_poly_set.cpp
|
2020-07-03 15:12:28 +00:00
|
|
|
src/geometry/shape_rect.cpp
|
2020-07-15 16:22:16 +00:00
|
|
|
src/geometry/shape_compound.cpp
|
2020-10-07 13:15:16 +00:00
|
|
|
src/geometry/shape_segment.cpp
|
2021-01-07 18:36:06 +00:00
|
|
|
|
|
|
|
|
2022-01-02 01:28:28 +00:00
|
|
|
src/math/vector2.cpp
|
2021-01-07 18:36:06 +00:00
|
|
|
src/math/util.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Include the other smaller math libraries in this one for convenience
|
|
|
|
add_library( kimath STATIC
|
|
|
|
${KIMATH_SRCS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries( kimath
|
2023-04-04 23:34:46 +00:00
|
|
|
core
|
2022-01-02 02:21:49 +00:00
|
|
|
clipper
|
2022-10-19 23:25:45 +00:00
|
|
|
clipper2
|
2022-01-02 02:21:49 +00:00
|
|
|
othermath
|
|
|
|
rtree
|
2023-03-10 13:22:42 +00:00
|
|
|
Boost::headers
|
2020-01-07 17:12:59 +00:00
|
|
|
${wxWidgets_LIBRARIES} # wxLogDebug, wxASSERT
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( kimath PUBLIC
|
2020-07-03 01:59:19 +00:00
|
|
|
${PROJECT_BINARY_DIR}
|
2020-01-07 17:12:59 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
2023-04-04 23:34:46 +00:00
|
|
|
|
|
|
|
# This include REALLY shouldn't be here, but shape_arc.h grew a dependency on the units somehow
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( kimath PRIVATE
|
2023-04-04 23:34:46 +00:00
|
|
|
# This include REALLY shouldn't be here, but shape_arc grew a dependency on the units somehow
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
2023-04-04 23:45:45 +00:00
|
|
|
${wxWidgets_INCLUDE_DIRS}
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|