2016-07-19 13:35:25 -04: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-22 22:33:36 -06:00
|
|
|
include_directories(BEFORE ${INC_BEFORE})
|
|
|
|
include_directories(
|
2017-04-17 01:41:21 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2012-01-22 22:33:36 -06:00
|
|
|
../pcbnew
|
2015-12-08 18:31:57 +11:00
|
|
|
3d_canvas
|
|
|
|
3d_cache
|
|
|
|
3d_rendering
|
|
|
|
3d_viewer
|
2016-07-19 13:35:25 -04:00
|
|
|
${CMAKE_SOURCE_DIR}
|
2015-12-08 18:31:57 +11:00
|
|
|
${CMAKE_SOURCE_DIR}/include/gal/opengl
|
2022-06-06 21:58:00 +01:00
|
|
|
${CMAKE_SOURCE_DIR}/common/dialogs
|
2012-01-22 22:33:36 -06:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2015-12-08 18:31:57 +11:00
|
|
|
# directories
|
2021-10-21 14:29:19 +01:00
|
|
|
set( DIR_RAY 3d_rendering/raytracing )
|
2015-12-08 18:31:57 +11:00
|
|
|
set( DIR_RAY_ACC ${DIR_RAY}/accelerators )
|
|
|
|
set( DIR_RAY_2D ${DIR_RAY}/shapes2D )
|
|
|
|
set( DIR_RAY_3D ${DIR_RAY}/shapes3D )
|
2015-12-14 08:45:22 +11:00
|
|
|
set( DIR_3D_PLUGINS ${CMAKE_SOURCE_DIR}/plugins/ldr )
|
2015-12-08 18:31:57 +11:00
|
|
|
|
2008-03-11 15:57:54 +00:00
|
|
|
set(3D-VIEWER_SRCS
|
2015-12-14 08:45:22 +11:00
|
|
|
${DIR_3D_PLUGINS}/pluginldr.cpp
|
|
|
|
${DIR_3D_PLUGINS}/3d/pluginldr3D.cpp
|
2015-12-08 18:31:57 +11: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 13:35:25 -04:00
|
|
|
3d_canvas/create_layer_items.cpp
|
2018-01-28 14:05:17 +01:00
|
|
|
3d_canvas/create_3Dgraphic_brd_items.cpp
|
2016-07-19 13:35:25 -04:00
|
|
|
3d_canvas/eda_3d_canvas.cpp
|
|
|
|
3d_canvas/eda_3d_canvas_pivot.cpp
|
2021-06-19 18:28:45 +01:00
|
|
|
3d_model_viewer/eda_3d_model_viewer.cpp
|
2021-10-21 14:29:19 +01: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
|
2025-06-09 19:29:34 +02:00
|
|
|
3d_rendering/opengl/3d_spheres_gizmo.cpp
|
2021-01-03 17:23:00 -05: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 09:11:00 +01:00
|
|
|
${DIR_RAY}/PerlinNoise.cpp
|
2021-01-03 17:23:00 -05:00
|
|
|
${DIR_RAY}/create_scene.cpp
|
2024-03-03 21:11:42 +03:00
|
|
|
${DIR_RAY}/render_3d_raytrace_base.cpp
|
|
|
|
${DIR_RAY}/render_3d_raytrace_gl.cpp
|
|
|
|
${DIR_RAY}/render_3d_raytrace_ram.cpp
|
2021-01-03 17:23:00 -05:00
|
|
|
${DIR_RAY}/frustum.cpp
|
|
|
|
${DIR_RAY}/material.cpp
|
2016-07-19 13:35:25 -04:00
|
|
|
${DIR_RAY}/mortoncodes.cpp
|
2015-12-08 18:31:57 +11:00
|
|
|
${DIR_RAY}/ray.cpp
|
2016-07-19 13:35:25 -04:00
|
|
|
${DIR_RAY}/raypacket.cpp
|
2021-01-03 17:23:00 -05: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 13:35:25 -04:00
|
|
|
3d_rendering/buffers_debug.cpp
|
2021-01-03 17:23:00 -05:00
|
|
|
3d_rendering/render_3d_base.cpp
|
2024-02-29 23:39:48 +03:00
|
|
|
3d_rendering/color_rgba.cpp
|
2021-01-03 17:23:00 -05:00
|
|
|
3d_rendering/image.cpp
|
|
|
|
3d_rendering/post_shader.cpp
|
|
|
|
3d_rendering/post_shader_ssao.cpp
|
|
|
|
3d_rendering/track_ball.cpp
|
2016-07-19 13:35:25 -04:00
|
|
|
3d_rendering/test_cases.cpp
|
2015-12-08 18:31:57 +11:00
|
|
|
3d_rendering/trackball.cpp
|
2020-03-24 01:01:23 +00:00
|
|
|
3d_viewer/3d_menubar.cpp
|
2025-02-26 03:22:49 +00:00
|
|
|
3d_viewer/toolbars_3d.cpp
|
2021-06-19 18:28:45 +01: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 13:03:59 +01:00
|
|
|
3d_viewer/eda_3d_viewer_frame.cpp
|
2021-06-19 18:28:45 +01:00
|
|
|
3d_viewer/eda_3d_viewer_settings.cpp
|
2021-01-03 17:23:00 -05:00
|
|
|
common_ogl/ogl_attr_list.cpp
|
2015-12-08 18:31:57 +11:00
|
|
|
common_ogl/ogl_utils.cpp
|
2016-07-19 13:35:25 -04:00
|
|
|
3d_fastmath.cpp
|
|
|
|
3d_math.cpp
|
2023-08-11 18:40:13 +01:00
|
|
|
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-22 22:33:36 -06:00
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2012-02-08 09:06:06 -06:00
|
|
|
add_library(3d-viewer STATIC ${3D-VIEWER_SRCS})
|
2014-10-07 14:10:01 -04:00
|
|
|
add_dependencies( 3d-viewer pcbcommon )
|
2015-12-08 18:31:57 +11:00
|
|
|
|
2017-02-20 17:57:41 +01:00
|
|
|
target_link_libraries( 3d-viewer
|
2022-01-01 21:21:49 -05:00
|
|
|
PRIVATE
|
|
|
|
gal
|
|
|
|
kimath
|
2023-04-05 00:34:46 +01:00
|
|
|
core
|
2023-09-06 20:33:28 -04:00
|
|
|
common
|
2022-01-01 21:21:49 -05:00
|
|
|
nlohmann_json
|
2023-03-10 13:22:42 +00:00
|
|
|
Boost::headers
|
2022-01-01 21:21:49 -05:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
kicad_3dsg )
|
2020-01-12 20:44:19 -05:00
|
|
|
|
2015-12-08 18:31:57 +11:00
|
|
|
add_subdirectory( 3d_cache )
|
2021-06-24 10:47:28 +02:00
|
|
|
|
2023-04-07 10:08:43 -07:00
|
|
|
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
|
|
|
|
add_subdirectory( 3d_navlib )
|
|
|
|
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
|