2016-07-19 17:35:25 +00:00
|
|
|
#add_definitions(-DPRINT_STATISTICS_3D_VIEWER)
|
2023-02-21 23:58:26 +00:00
|
|
|
add_compile_definitions( PCBNEW )
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
include_directories(BEFORE ${INC_BEFORE})
|
|
|
|
include_directories(
|
2017-04-17 01:41:21 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2012-01-23 04:33:36 +00:00
|
|
|
../pcbnew
|
2015-12-08 07:31:57 +00:00
|
|
|
3d_canvas
|
|
|
|
3d_cache
|
|
|
|
3d_rendering
|
|
|
|
3d_viewer
|
2016-07-19 17:35:25 +00:00
|
|
|
${CMAKE_SOURCE_DIR}
|
2015-12-08 07:31:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/include/gal/opengl
|
2022-06-06 20:58:00 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/dialogs
|
2012-01-23 04:33:36 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2015-12-08 07:31:57 +00:00
|
|
|
# directories
|
2021-10-21 13:29:19 +00:00
|
|
|
set( DIR_RAY 3d_rendering/raytracing )
|
2015-12-08 07:31:57 +00:00
|
|
|
set( DIR_RAY_ACC ${DIR_RAY}/accelerators )
|
|
|
|
set( DIR_RAY_2D ${DIR_RAY}/shapes2D )
|
|
|
|
set( DIR_RAY_3D ${DIR_RAY}/shapes3D )
|
2015-12-13 21:45:22 +00:00
|
|
|
set( DIR_3D_PLUGINS ${CMAKE_SOURCE_DIR}/plugins/ldr )
|
2015-12-08 07:31:57 +00:00
|
|
|
|
2008-03-11 15:57:54 +00:00
|
|
|
set(3D-VIEWER_SRCS
|
2015-12-13 21:45:22 +00:00
|
|
|
${DIR_3D_PLUGINS}/pluginldr.cpp
|
|
|
|
${DIR_3D_PLUGINS}/3d/pluginldr3D.cpp
|
2015-12-08 07:31:57 +00:00
|
|
|
3d_cache/3d_cache.cpp
|
|
|
|
3d_cache/3d_plugin_manager.cpp
|
2020-03-26 14:05:20 +00:00
|
|
|
3d_canvas/board_adapter.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_canvas/create_layer_items.cpp
|
2018-01-28 13:05:17 +00:00
|
|
|
3d_canvas/create_3Dgraphic_brd_items.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_canvas/create_layer_poly.cpp
|
|
|
|
3d_canvas/eda_3d_canvas.cpp
|
|
|
|
3d_canvas/eda_3d_canvas_pivot.cpp
|
2021-06-19 17:28:45 +00:00
|
|
|
3d_model_viewer/eda_3d_model_viewer.cpp
|
2021-10-21 13:29:19 +00:00
|
|
|
3d_rendering/opengl/3d_model.cpp
|
|
|
|
3d_rendering/opengl/opengl_utils.cpp
|
|
|
|
3d_rendering/opengl/create_scene.cpp
|
|
|
|
3d_rendering/opengl/render_3d_opengl.cpp
|
|
|
|
3d_rendering/opengl/layer_triangles.cpp
|
2021-01-03 22:23:00 +00:00
|
|
|
${DIR_RAY_ACC}/accelerator_3d.cpp
|
|
|
|
${DIR_RAY_ACC}/bvh_packet_traversal.cpp
|
|
|
|
${DIR_RAY_ACC}/bvh_pbrt.cpp
|
|
|
|
${DIR_RAY_ACC}/container_3d.cpp
|
|
|
|
${DIR_RAY_ACC}/container_2d.cpp
|
2016-10-02 08:11:00 +00:00
|
|
|
${DIR_RAY}/PerlinNoise.cpp
|
2021-01-03 22:23:00 +00:00
|
|
|
${DIR_RAY}/create_scene.cpp
|
|
|
|
${DIR_RAY}/render_3d_raytrace.cpp
|
|
|
|
${DIR_RAY}/frustum.cpp
|
|
|
|
${DIR_RAY}/material.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
${DIR_RAY}/mortoncodes.cpp
|
2015-12-08 07:31:57 +00:00
|
|
|
${DIR_RAY}/ray.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
${DIR_RAY}/raypacket.cpp
|
2021-01-03 22:23:00 +00:00
|
|
|
${DIR_RAY_2D}/bbox_2d.cpp
|
|
|
|
${DIR_RAY_2D}/filled_circle_2d.cpp
|
|
|
|
${DIR_RAY_2D}/layer_item_2d.cpp
|
|
|
|
${DIR_RAY_2D}/object_2d.cpp
|
|
|
|
${DIR_RAY_2D}/polygon_2d.cpp
|
|
|
|
${DIR_RAY_2D}/4pt_polygon_2d.cpp
|
|
|
|
${DIR_RAY_2D}/ring_2d.cpp
|
|
|
|
${DIR_RAY_2D}/round_segment_2d.cpp
|
|
|
|
${DIR_RAY_2D}/triangle_2d.cpp
|
|
|
|
${DIR_RAY_3D}/bbox_3d.cpp
|
|
|
|
${DIR_RAY_3D}/bbox_3d_ray.cpp
|
|
|
|
${DIR_RAY_3D}/cylinder_3d.cpp
|
|
|
|
${DIR_RAY_3D}/dummy_block_3d.cpp
|
|
|
|
${DIR_RAY_3D}/layer_item_3d.cpp
|
|
|
|
${DIR_RAY_3D}/object_3d.cpp
|
|
|
|
${DIR_RAY_3D}/plane_3d.cpp
|
|
|
|
${DIR_RAY_3D}/round_segment_3d.cpp
|
|
|
|
${DIR_RAY_3D}/triangle_3d.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_rendering/buffers_debug.cpp
|
2021-01-03 22:23:00 +00:00
|
|
|
3d_rendering/render_3d_base.cpp
|
|
|
|
3d_rendering/camera.cpp
|
|
|
|
3d_rendering/color_rgb.cpp
|
|
|
|
3d_rendering/image.cpp
|
|
|
|
3d_rendering/post_shader.cpp
|
|
|
|
3d_rendering/post_shader_ssao.cpp
|
|
|
|
3d_rendering/track_ball.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_rendering/test_cases.cpp
|
2015-12-08 07:31:57 +00:00
|
|
|
3d_rendering/trackball.cpp
|
2020-03-24 01:01:23 +00:00
|
|
|
3d_viewer/3d_menubar.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_viewer/3d_toolbar.cpp
|
2021-06-19 17:28:45 +00:00
|
|
|
3d_viewer/tools/eda_3d_actions.cpp
|
|
|
|
3d_viewer/tools/eda_3d_conditions.cpp
|
|
|
|
3d_viewer/tools/eda_3d_controller.cpp
|
2021-08-05 12:03:59 +00:00
|
|
|
3d_viewer/eda_3d_viewer_frame.cpp
|
2021-06-19 17:28:45 +00:00
|
|
|
3d_viewer/eda_3d_viewer_settings.cpp
|
2021-01-03 22:23:00 +00:00
|
|
|
common_ogl/ogl_attr_list.cpp
|
2015-12-08 07:31:57 +00:00
|
|
|
common_ogl/ogl_utils.cpp
|
2016-07-19 17:35:25 +00:00
|
|
|
3d_fastmath.cpp
|
|
|
|
3d_math.cpp
|
2023-08-11 17:40:13 +00:00
|
|
|
dialogs/3d_cache_dialogs.cpp
|
|
|
|
dialogs/appearance_controls_3D.cpp
|
|
|
|
dialogs/appearance_controls_3D_base.cpp
|
|
|
|
dialogs/dialog_select_3d_model_base.cpp
|
|
|
|
dialogs/dialog_select_3d_model.cpp
|
|
|
|
dialogs/panel_preview_3d_model_base.cpp
|
|
|
|
dialogs/panel_preview_3d_model.cpp
|
|
|
|
dialogs/panel_3D_display_options.cpp
|
|
|
|
dialogs/panel_3D_display_options_base.cpp
|
|
|
|
dialogs/panel_3D_opengl_options.cpp
|
|
|
|
dialogs/panel_3D_opengl_options_base.cpp
|
|
|
|
dialogs/panel_3D_raytracing_options.cpp
|
|
|
|
dialogs/panel_3D_raytracing_options_base.cpp
|
2012-01-23 04:33:36 +00:00
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2012-02-08 15:06:06 +00:00
|
|
|
add_library(3d-viewer STATIC ${3D-VIEWER_SRCS})
|
2014-10-07 18:10:01 +00:00
|
|
|
add_dependencies( 3d-viewer pcbcommon )
|
2015-12-08 07:31:57 +00:00
|
|
|
|
2017-02-20 16:57:41 +00:00
|
|
|
target_link_libraries( 3d-viewer
|
2022-01-02 02:21:49 +00:00
|
|
|
PRIVATE
|
|
|
|
gal
|
|
|
|
kimath
|
2023-04-04 23:34:46 +00:00
|
|
|
core
|
2022-01-02 02:21:49 +00:00
|
|
|
nlohmann_json
|
2023-03-10 13:22:42 +00:00
|
|
|
Boost::headers
|
2022-01-02 02:21:49 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
kicad_3dsg )
|
2020-01-13 01:44:19 +00:00
|
|
|
|
2015-12-08 07:31:57 +00:00
|
|
|
add_subdirectory( 3d_cache )
|
2021-06-24 08:47:28 +00:00
|
|
|
|
2023-04-07 17:08:43 +00:00
|
|
|
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
|
|
|
|
add_subdirectory( 3d_navlib )
|
|
|
|
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
|