You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

759 lines
24 KiB

Horizontal/vertical zoom for Simulator plots ADDED: Horizontal/vertical zoom for simulator plots, via mouse wheel, toolbar buttons, menu commands, and hotkeys. ADDED: Simulator preferences panel, populated with mouse wheel and trackpad settings that control pan and zoom of simulator plots. ADDED: Zoom In/Out Horizontally/Vertically commands that can be bound to hotkeys. CHANGED: Simulator plot scroll wheel gestures are no longer hard-coded and can now be configured via the new Simulator preferences panel. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16597 Other unreported bugs that were fixed: - Fixed wierd, jumpy simulator plot view limiting behavior. - Fixed Zoom In Center and Zoom Out Center commands not preserving the simulator plot center point. - Fixed simulator plot nudging when exported as PNGs. - Fixed rectangular selection zoom being able to exceed simulator plot view limits. Notes: - Provided new SIM_PREFERENCES struct to be used for future simulator preferences set via the simulator preferences dialog. - Bundled pre-existing EESCHEMA_SETTINGS::SIMULATOR settings into EESCHEMA_SETTINGS::SIMULATOR::VIEW. - Replaced mpWindow::EnableMouseWheelPan with more general SetMouseWheelActions. - Refactored and tidied up wxMathPlot's mpWindow code involved with fitting, zooming, and panning. - Consolidated long lists of duplicated member variable initializers to a new mpWindow private delegated constructor. - Provided provisional Zoom In/Out Horizontally/Vertically toolbar icons that need improvement by a graphics designer. - Provided gitignore entries for the Qt Creator IDE
2 years ago
9 months ago
7 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
  1. # Add all the warnings to the files
  2. if( COMPILER_SUPPORTS_WARNINGS )
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS_CXX}")
  4. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}")
  5. endif()
  6. if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
  7. if( MSYS )
  8. # For some reason the big file sim/ngspice_models.cpp creates an issue when
  9. # compiled in debug mode on msys2
  10. # (Probably some out of memory issue that crashes Eeschema at start)
  11. # So compile it in release mode that generates much smaller binaries
  12. set_source_files_properties( sim/ngspice_models.cpp PROPERTIES COMPILE_FLAGS "-O2" )
  13. endif()
  14. endif()
  15. # Add ngspice to eeschema
  16. set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
  17. # Find out the exact libngspice file name
  18. get_filename_component( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE )
  19. get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME )
  20. get_filename_component( NGSPICE_DLL_DIR "${NGSPICE_DLL_ABSPATH}" DIRECTORY )
  21. set_property( SOURCE sim/ngspice.cpp
  22. APPEND PROPERTY COMPILE_DEFINITIONS
  23. NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}"
  24. NGSPICE_DLL_DIR="${NGSPICE_DLL_DIR}"
  25. )
  26. include_directories( BEFORE ${INC_BEFORE} )
  27. include_directories(
  28. ${CMAKE_SOURCE_DIR}/common
  29. ${CMAKE_SOURCE_DIR}/common/dialogs
  30. ${CMAKE_SOURCE_DIR}/libs/sexpr/include
  31. ${INC_AFTER}
  32. ./dialogs
  33. ./libview
  34. ./symbol_editor
  35. ./tools
  36. ./widgets
  37. )
  38. set( EESCHEMA_SCH_IO
  39. sch_io/sch_io_lib_cache.cpp
  40. sch_io/sch_io.cpp
  41. sch_io/sch_io_mgr.cpp
  42. # KiCad IO plugin
  43. sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp
  44. sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp
  45. sch_io/kicad_sexpr/sch_io_kicad_sexpr_common.cpp
  46. sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp
  47. # Legacy IO plugin
  48. sch_io/kicad_legacy/sch_io_kicad_legacy_lib_cache.cpp
  49. sch_io/kicad_legacy/sch_io_kicad_legacy.cpp
  50. sch_io/kicad_legacy/sch_io_kicad_legacy_helpers.cpp
  51. # HTTP IO plugin
  52. sch_io/http_lib/sch_io_http_lib.cpp
  53. # Database IO plugin
  54. sch_io/database/sch_io_database.cpp
  55. # Eagle IO plugin
  56. sch_io/eagle/sch_io_eagle.cpp
  57. # Altium IO plugin
  58. sch_io/altium/altium_parser_sch.cpp
  59. sch_io/altium/sch_io_altium.cpp
  60. # Cadstar IO plugin
  61. sch_io/cadstar/cadstar_sch_archive_loader.cpp
  62. sch_io/cadstar/cadstar_sch_archive_parser.cpp
  63. sch_io/cadstar/sch_io_cadstar_archive.cpp
  64. # LTSpice IO plugin
  65. sch_io/ltspice/ltspice_schematic.cpp
  66. sch_io/ltspice/sch_io_ltspice.cpp
  67. sch_io/ltspice/sch_io_ltspice_parser.cpp
  68. # EasyEDA IO plugin
  69. sch_io/easyeda/sch_easyeda_parser.cpp
  70. sch_io/easyeda/sch_io_easyeda.cpp
  71. # EasyEDA Pro IO plugin
  72. sch_io/easyedapro/sch_easyedapro_parser.cpp
  73. sch_io/easyedapro/sch_io_easyedapro.cpp
  74. )
  75. set( EESCHEMA_DLGS
  76. dialogs/dialog_annotate.cpp
  77. dialogs/dialog_annotate_base.cpp
  78. dialogs/dialog_bom.cpp
  79. dialogs/dialog_bom_base.cpp
  80. dialogs/dialog_change_symbols.cpp
  81. dialogs/dialog_change_symbols_base.cpp
  82. dialogs/dialog_database_lib_settings_base.cpp
  83. dialogs/dialog_database_lib_settings.cpp
  84. dialogs/dialog_edit_symbols_libid.cpp
  85. dialogs/dialog_edit_symbols_libid_base.cpp
  86. dialogs/dialog_eeschema_page_settings.cpp
  87. dialogs/dialog_erc.cpp
  88. dialogs/dialog_erc_base.cpp
  89. dialogs/dialog_export_netlist.cpp
  90. dialogs/dialog_export_netlist_base.cpp
  91. dialogs/dialog_field_properties.cpp
  92. dialogs/dialog_field_properties_base.cpp
  93. dialogs/dialog_global_edit_text_and_graphics.cpp
  94. dialogs/dialog_global_edit_text_and_graphics_base.cpp
  95. dialogs/dialog_global_sym_lib_table_config.cpp
  96. dialogs/dialog_ibis_parser_reporter.cpp
  97. dialogs/dialog_ibis_parser_reporter_base.cpp
  98. dialogs/dialog_image_properties.cpp
  99. dialogs/dialog_image_properties_base.cpp
  100. dialogs/dialog_increment_annotations_base.cpp
  101. dialogs/dialog_junction_props.cpp
  102. dialogs/dialog_junction_props_base.cpp
  103. dialogs/dialog_label_properties.cpp
  104. dialogs/dialog_label_properties_base.cpp
  105. dialogs/dialog_lib_edit_pin_table.cpp
  106. dialogs/dialog_lib_edit_pin_table_base.cpp
  107. dialogs/dialog_lib_fields_table_base.cpp
  108. dialogs/dialog_lib_fields_table.cpp
  109. dialogs/dialog_lib_new_symbol.cpp
  110. dialogs/dialog_lib_new_symbol_base.cpp
  111. dialogs/dialog_lib_symbol_properties.cpp
  112. dialogs/dialog_lib_symbol_properties_base.cpp
  113. dialogs/dialog_line_properties.cpp
  114. dialogs/dialog_line_properties_base.cpp
  115. dialogs/dialog_migrate_buses.cpp
  116. dialogs/dialog_migrate_buses_base.cpp
  117. dialogs/dialog_pin_properties.cpp
  118. dialogs/dialog_pin_properties_base.cpp
  119. dialogs/dialog_plot_schematic.cpp
  120. dialogs/dialog_plot_schematic_base.cpp
  121. dialogs/dialog_erc_job_config.cpp
  122. dialogs/dialog_rescue_each.cpp
  123. dialogs/dialog_rescue_each_base.cpp
  124. dialogs/dialog_sch_import_settings.cpp
  125. dialogs/dialog_sch_import_settings_base.cpp
  126. dialogs/dialog_sch_find.cpp
  127. dialogs/dialog_sch_find_base.cpp
  128. dialogs/dialog_schematic_setup.cpp
  129. dialogs/dialog_shape_properties.cpp
  130. dialogs/dialog_shape_properties_base.cpp
  131. dialogs/dialog_sheet_pin_properties.cpp
  132. dialogs/dialog_sheet_pin_properties_base.cpp
  133. dialogs/dialog_sheet_properties.cpp
  134. dialogs/dialog_sheet_properties_base.cpp
  135. dialogs/dialog_symbol_chooser.cpp
  136. dialogs/dialog_symbol_fields_table.cpp
  137. dialogs/dialog_symbol_fields_table_base.cpp
  138. dialogs/dialog_symbol_properties.cpp
  139. dialogs/dialog_symbol_properties_base.cpp
  140. dialogs/dialog_symbol_remap.cpp
  141. dialogs/dialog_symbol_remap_base.cpp
  142. dialogs/dialog_table_properties.cpp
  143. dialogs/dialog_table_properties_base.cpp
  144. dialogs/dialog_tablecell_properties.cpp
  145. dialogs/dialog_tablecell_properties_base.cpp
  146. dialogs/dialog_text_properties.cpp
  147. dialogs/dialog_text_properties_base.cpp
  148. dialogs/dialog_update_from_pcb.cpp
  149. dialogs/dialog_update_from_pcb_base.cpp
  150. dialogs/dialog_update_symbol_fields.cpp
  151. dialogs/dialog_update_symbol_fields_base.cpp
  152. dialogs/dialog_wire_bus_properties.cpp
  153. dialogs/dialog_wire_bus_properties_base.cpp
  154. dialogs/panel_bom_presets.cpp
  155. dialogs/panel_bom_presets_base.cpp
  156. dialogs/panel_eeschema_color_settings.cpp
  157. dialogs/panel_eeschema_display_options.cpp
  158. dialogs/panel_eeschema_display_options_base.cpp
  159. dialogs/panel_eeschema_annotation_options.cpp
  160. dialogs/panel_eeschema_annotation_options_base.cpp
  161. dialogs/panel_eeschema_editing_options.cpp
  162. dialogs/panel_eeschema_editing_options_base.cpp
  163. dialogs/panel_setup_buses.cpp
  164. dialogs/panel_setup_buses_base.cpp
  165. dialogs/panel_setup_formatting.cpp
  166. dialogs/panel_setup_formatting_base.cpp
  167. dialogs/panel_setup_pinmap.cpp
  168. dialogs/panel_setup_pinmap_base.cpp
  169. dialogs/panel_simulator_preferences.cpp
  170. dialogs/panel_simulator_preferences_base.cpp
  171. dialogs/panel_sym_color_settings.cpp
  172. dialogs/panel_sym_color_settings_base.cpp
  173. dialogs/panel_sym_display_options.cpp
  174. dialogs/panel_sym_display_options_base.cpp
  175. dialogs/panel_sym_editing_options.cpp
  176. dialogs/panel_sym_editing_options_base.cpp
  177. dialogs/panel_sym_lib_table.cpp
  178. dialogs/panel_sym_lib_table_base.cpp
  179. dialogs/panel_template_fieldnames.cpp
  180. dialogs/panel_template_fieldnames_base.cpp
  181. )
  182. # The simulator source files
  183. set( EESCHEMA_SIM_SRCS
  184. dialogs/dialog_sim_command.cpp
  185. dialogs/dialog_sim_command_base.cpp
  186. dialogs/dialog_sim_format_value.cpp
  187. dialogs/dialog_sim_format_value_base.cpp
  188. dialogs/dialog_sim_model.cpp
  189. dialogs/dialog_sim_model_base.cpp
  190. dialogs/dialog_user_defined_signals.cpp
  191. dialogs/dialog_user_defined_signals_base.cpp
  192. tools/simulator_control.cpp
  193. sim/sim_library.cpp
  194. sim/sim_library_spice.cpp
  195. sim/sim_library_ibis.cpp
  196. sim/sim_lib_mgr.cpp
  197. sim/sim_model_serializer.cpp
  198. sim/sim_model.cpp
  199. sim/sim_model_behavioral.cpp
  200. sim/sim_model_ideal.cpp
  201. sim/sim_model_l_mutual.cpp
  202. sim/sim_model_ibis.cpp
  203. sim/sim_model_ngspice.cpp
  204. sim/sim_model_ngspice_data_bjt.cpp
  205. sim/sim_model_ngspice_data_bsim1.cpp
  206. sim/sim_model_ngspice_data_bsim2.cpp
  207. sim/sim_model_ngspice_data_bsim3.cpp
  208. sim/sim_model_ngspice_data_bsim4.cpp
  209. sim/sim_model_ngspice_data_b3soi.cpp
  210. sim/sim_model_ngspice_data_b4soi.cpp
  211. sim/sim_model_ngspice_data_diode.cpp
  212. sim/sim_model_ngspice_data_hfet.cpp
  213. sim/sim_model_ngspice_data_hicum2.cpp
  214. sim/sim_model_ngspice_data_hsim.cpp
  215. sim/sim_model_ngspice_data_jfet.cpp
  216. sim/sim_model_ngspice_data_mes.cpp
  217. sim/sim_model_ngspice_data_mos.cpp
  218. sim/sim_model_ngspice_data_mos6.cpp
  219. sim/sim_model_ngspice_data_mos9.cpp
  220. sim/sim_model_ngspice_data_vbic.cpp
  221. sim/sim_model_r_pot.cpp
  222. sim/sim_model_raw_spice.cpp
  223. sim/sim_model_source.cpp
  224. sim/sim_model_spice.cpp
  225. sim/sim_model_spice_fallback.cpp
  226. sim/sim_model_subckt.cpp
  227. sim/sim_model_switch.cpp
  228. sim/sim_model_tline.cpp
  229. sim/sim_model_xspice.cpp
  230. sim/sim_value.cpp
  231. sim/spice_settings.cpp
  232. sim/spice_generator.cpp
  233. sim/spice_library_parser.cpp
  234. sim/spice_model_parser.cpp
  235. sim/kibis/ibis_parser.cpp
  236. sim/kibis/kibis.cpp
  237. sim/spice_circuit_model.cpp
  238. sim/ngspice.cpp
  239. sim/simulator_frame.cpp
  240. sim/simulator_frame_ui.cpp
  241. sim/simulator_frame_ui_base.cpp
  242. sim/sim_plot_colors.cpp
  243. sim/sim_plot_tab.cpp
  244. sim/sim_property.cpp
  245. sim/sim_tab.cpp
  246. sim/spice_simulator.cpp
  247. sim/spice_value.cpp
  248. sim/toolbars_simulator_frame.cpp
  249. sim/legacy_workbook.cpp
  250. widgets/tuner_slider.cpp
  251. widgets/tuner_slider_base.cpp
  252. )
  253. set( EESCHEMA_WIDGETS
  254. widgets/hierarchy_pane.cpp
  255. widgets/panel_sch_selection_filter_base.cpp
  256. widgets/panel_sch_selection_filter.cpp
  257. widgets/panel_symbol_chooser.cpp
  258. widgets/pinshape_combobox.cpp
  259. widgets/pintype_combobox.cpp
  260. widgets/symbol_diff_widget.cpp
  261. widgets/sch_design_block_pane.cpp
  262. widgets/sch_design_block_preview_widget.cpp
  263. widgets/sch_properties_panel.cpp
  264. widgets/sch_search_pane.cpp
  265. widgets/search_handlers.cpp
  266. widgets/symbol_filter_combobox.cpp
  267. widgets/symbol_preview_widget.cpp
  268. widgets/symbol_tree_pane.cpp
  269. )
  270. set ( EESCHEMA_LIBEDIT_SRCS
  271. symbol_editor/lib_logger.cpp
  272. symbol_editor/lib_symbol_library_manager.cpp
  273. symbol_editor/menubar_symbol_editor.cpp
  274. symbol_editor/symbol_edit_frame.cpp
  275. symbol_editor/symbol_editor.cpp
  276. symbol_editor/symbol_editor_import_export.cpp
  277. symbol_editor/symbol_editor_plotter.cpp
  278. symbol_editor/symbol_editor_settings.cpp
  279. symbol_editor/symbol_editor_undo_redo.cpp
  280. symbol_editor/toolbars_symbol_editor.cpp
  281. )
  282. set( EESCHEMA_IMPORT_GFX
  283. import_gfx/dialog_import_gfx_sch_base.cpp
  284. import_gfx/dialog_import_gfx_sch.cpp
  285. import_gfx/graphics_importer_lib_symbol.cpp
  286. import_gfx/graphics_importer_sch.cpp
  287. )
  288. set( EESCHEMA_PRINTING
  289. printing/dialog_print.cpp
  290. printing/dialog_print_base.cpp
  291. printing/sch_printout.cpp
  292. )
  293. set( SYNC_SHEET_PIN_SRCS
  294. sync_sheet_pin/dialog_sync_sheet_pins.cpp
  295. sync_sheet_pin/dialog_sync_sheet_pins_base.cpp
  296. sync_sheet_pin/panel_sync_sheet_pins.cpp
  297. sync_sheet_pin/panel_sync_sheet_pins_base.cpp
  298. sync_sheet_pin/sheet_synchronization_agent.cpp
  299. sync_sheet_pin/sheet_synchronization_item.cpp
  300. sync_sheet_pin/sheet_synchronization_notifier.cpp
  301. sync_sheet_pin/sheet_synchronization_model.cpp
  302. )
  303. set( EESCHEMA_ERC_SRCS
  304. erc/erc.cpp
  305. erc/erc_item.cpp
  306. erc/erc_report.cpp
  307. erc/erc_sch_pin_context.cpp
  308. erc/erc_settings.cpp
  309. )
  310. set( EESCHEMA_SRCS
  311. ${EESCHEMA_DLGS}
  312. ${EESCHEMA_ERC_SRCS}
  313. ${EESCHEMA_LIBEDIT_SRCS}
  314. ${EESCHEMA_SCH_IO}
  315. ${EESCHEMA_SIM_SRCS}
  316. ${EESCHEMA_WIDGETS}
  317. ${EESCHEMA_IMPORT_GFX}
  318. ${SYNC_SHEET_PIN_SRCS}
  319. annotate.cpp
  320. autoplace_fields.cpp
  321. bom_plugins.cpp
  322. bus-wire-junction.cpp
  323. connection_graph.cpp
  324. cross-probing.cpp
  325. sch_design_block_utils.cpp
  326. eeschema_config.cpp
  327. eeschema_helpers.cpp
  328. eeschema_jobs_handler.cpp
  329. eeschema_settings.cpp
  330. fields_data_model.cpp
  331. fields_grid_table.cpp
  332. files-io.cpp
  333. generate_alias_info.cpp
  334. gfx_import_utils.cpp
  335. junction_helpers.cpp
  336. lib_fields_data_model.cpp
  337. lib_symbol.cpp
  338. libarch.cpp
  339. menubar.cpp
  340. net_navigator.cpp
  341. picksymbol.cpp
  342. pin_layout_cache.cpp
  343. pin_numbers.cpp
  344. pin_type.cpp
  345. project_sch.cpp
  346. project_rescue.cpp
  347. refdes_tracker.cpp
  348. sch_base_frame.cpp
  349. sch_bitmap.cpp
  350. sch_bus_entry.cpp
  351. sch_collectors.cpp
  352. sch_commit.cpp
  353. sch_connection.cpp
  354. sch_draw_panel.cpp
  355. sch_edit_frame.cpp
  356. sch_field.cpp
  357. sch_group.cpp
  358. sch_item.cpp
  359. sch_junction.cpp
  360. sch_label.cpp
  361. sch_line.cpp
  362. sch_marker.cpp
  363. sch_no_connect.cpp
  364. sch_painter.cpp
  365. sch_pin.cpp
  366. sch_plotter.cpp
  367. sch_preview_panel.cpp
  368. sch_reference_list.cpp
  369. sch_render_settings.cpp
  370. sch_screen.cpp
  371. sch_shape.cpp
  372. sch_rule_area.cpp
  373. sch_sheet.cpp
  374. sch_sheet_path.cpp
  375. sch_sheet_pin.cpp
  376. sch_symbol.cpp
  377. sch_table.cpp
  378. sch_tablecell.cpp
  379. sch_text.cpp
  380. sch_textbox.cpp
  381. sch_validators.cpp
  382. sch_view.cpp
  383. schematic.cpp
  384. schematic_settings.cpp
  385. schematic_undo_redo.cpp
  386. sheet.cpp
  387. symbol.cpp
  388. symbol_async_loader.cpp
  389. symbol_checker.cpp
  390. symbol_chooser_frame.cpp
  391. symbol_lib_table.cpp
  392. symbol_library.cpp
  393. symbol_library_manager.cpp
  394. symbol_tree_model_adapter.cpp
  395. symbol_tree_synchronizing_adapter.cpp
  396. symbol_viewer_frame.cpp
  397. symb_transforms_utils.cpp
  398. toolbars_sch_editor.cpp
  399. toolbars_symbol_viewer.cpp
  400. api/api_sch_utils.cpp
  401. netlist_exporters/netlist_exporter_allegro.cpp
  402. netlist_exporters/netlist_exporter_base.cpp
  403. netlist_exporters/netlist_exporter_cadstar.cpp
  404. netlist_exporters/netlist_exporter_kicad.cpp
  405. netlist_exporters/netlist_exporter_pads.cpp
  406. netlist_exporters/netlist_exporter_orcadpcb2.cpp
  407. netlist_exporters/netlist_exporter_spice.cpp
  408. netlist_exporters/netlist_exporter_spice_model.cpp
  409. netlist_exporters/netlist_exporter_xml.cpp
  410. netlist_exporters/netlist_generator.cpp
  411. tools/assign_footprints.cpp
  412. tools/backannotate.cpp
  413. tools/ee_grid_helper.cpp
  414. tools/rule_area_create_helper.cpp
  415. tools/sch_actions.cpp
  416. tools/sch_drawing_tools.cpp
  417. tools/sch_design_block_control.cpp
  418. tools/sch_edit_table_tool.cpp
  419. tools/sch_edit_tool.cpp
  420. tools/sch_editor_control.cpp
  421. tools/sch_editor_conditions.cpp
  422. tools/sch_find_replace_tool.cpp
  423. tools/sch_group_tool.cpp
  424. tools/sch_inspection_tool.cpp
  425. tools/sch_line_wire_bus_tool.cpp
  426. tools/sch_move_tool.cpp
  427. tools/sch_navigate_tool.cpp
  428. tools/sch_point_editor.cpp
  429. tools/sch_selection.cpp
  430. tools/sch_selection_tool.cpp
  431. tools/sch_tool_utils.cpp
  432. tools/symbol_editor_control.cpp
  433. tools/symbol_editor_drawing_tools.cpp
  434. tools/symbol_editor_edit_tool.cpp
  435. tools/symbol_editor_move_tool.cpp
  436. tools/symbol_editor_pin_tool.cpp
  437. )
  438. if( KICAD_IPC_API )
  439. set( EESCHEMA_SRCS
  440. ${EESCHEMA_SRCS}
  441. api/api_handler_sch.cpp
  442. )
  443. endif()
  444. if( WIN32 )
  445. if( MINGW )
  446. # EESCHEMA_RESOURCES variable is set by the macro.
  447. mingw_resource_compiler( eeschema )
  448. else()
  449. set( EESCHEMA_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/eeschema.rc )
  450. endif()
  451. endif()
  452. # Create a C++ compilable string initializer containing markdown text into a *.h file:
  453. add_custom_command(
  454. OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_md.h
  455. COMMAND ${CMAKE_COMMAND}
  456. -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.md
  457. -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_md.h
  458. -P ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  459. DEPENDS ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.md
  460. COMMENT "creating ${KICAD_CMAKE_MODULE_PATH}/dialogs/dialog_bom_help_md.h
  461. from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.md"
  462. )
  463. set_source_files_properties( dialogs/dialog_bom.cpp
  464. PROPERTIES
  465. OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_md.h
  466. )
  467. # Create a C++ compilable string initializer containing markdown text into a *.h file:
  468. add_custom_command(
  469. OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help_md.h
  470. COMMAND ${CMAKE_COMMAND}
  471. -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help.md
  472. -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help_md.h
  473. -P ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  474. DEPENDS ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help.md
  475. COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help_md.h
  476. from ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help.md"
  477. )
  478. set_source_files_properties( sch_text.cpp
  479. PROPERTIES
  480. OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help_md.h
  481. )
  482. # Create a C++ compilable string initializer containing markdown text into a *.h file:
  483. add_custom_command(
  484. OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sim/user_defined_signals_help_md.h
  485. COMMAND ${CMAKE_COMMAND}
  486. -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/sim/user_defined_signals_help.md
  487. -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/sim/user_defined_signals_help_md.h
  488. -P ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  489. DEPENDS ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake sim/user_defined_signals_help.md
  490. COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/sim/user_defined_signals_help_md.h
  491. from ${CMAKE_CURRENT_SOURCE_DIR}/sch_spice_fcn_help.md"
  492. )
  493. set_source_files_properties( dialogs/dialog_user_defined_signals.cpp
  494. PROPERTIES
  495. OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sim/user_defined_signals_help_md.h
  496. )
  497. if( APPLE )
  498. # setup bundle
  499. set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns libedit.icns libedit_doc.icns )
  500. set_source_files_properties(
  501. "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns"
  502. "${CMAKE_CURRENT_SOURCE_DIR}/eeschema_doc.icns"
  503. "${CMAKE_CURRENT_SOURCE_DIR}/libedit.icns"
  504. "${CMAKE_CURRENT_SOURCE_DIR}/libedit_doc.icns"
  505. PROPERTIES MACOSX_PACKAGE_LOCATION Resources
  506. )
  507. set( MACOSX_BUNDLE_ICON_FILE eeschema.icns )
  508. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
  509. set( MACOSX_BUNDLE_NAME eeschema )
  510. endif()
  511. add_executable( eeschema WIN32 MACOSX_BUNDLE
  512. ${CMAKE_SOURCE_DIR}/common/single_top.cpp
  513. ${EESCHEMA_RESOURCES}
  514. )
  515. set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
  516. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_SCH;PGM_DATA_FILE_EXT=\"kicad_sch\";BUILD_KIWAY_DLL"
  517. )
  518. target_link_libraries( eeschema
  519. kicommon
  520. ${wxWidgets_LIBRARIES}
  521. )
  522. # the main Eeschema program, in DSO form.
  523. add_library( eeschema_kiface_objects OBJECT
  524. ${EESCHEMA_SRCS}
  525. ${EESCHEMA_PRINTING}
  526. ${EESCHEMA_COMMON_SRCS}
  527. )
  528. if( KICAD_USE_PCH )
  529. target_precompile_headers( eeschema_kiface_objects
  530. PRIVATE
  531. <vector>
  532. <map>
  533. <memory>
  534. <unordered_map>
  535. <sch_edit_frame.h>
  536. <string_utils.h>
  537. <schematic.h>
  538. <pgm_base.h>
  539. <wx/wx.h> )
  540. endif()
  541. target_include_directories( eeschema_kiface_objects
  542. PUBLIC
  543. .
  544. netlist_exporters
  545. )
  546. target_link_libraries( eeschema_kiface_objects
  547. PUBLIC
  548. common )
  549. # Since we're not using target_link_libraries, we need to explicitly
  550. # declare the dependency
  551. add_dependencies( eeschema_kiface_objects common )
  552. message( STATUS "Including 3Dconnexion SpaceMouse navigation support in eeschema" )
  553. add_subdirectory( navlib )
  554. target_link_libraries( eeschema_kiface_objects PUBLIC eeschema_navlib)
  555. add_dependencies( eeschema_kiface_objects eeschema_navlib )
  556. add_library( eeschema_kiface MODULE
  557. eeschema.cpp
  558. )
  559. target_link_libraries( eeschema_kiface
  560. PRIVATE
  561. common
  562. eeschema_kiface_objects
  563. markdown_lib
  564. scripting
  565. sexpr
  566. core
  567. Boost::headers
  568. ${wxWidgets_LIBRARIES}
  569. ${NGSPICE_LIBRARY}
  570. )
  571. if( MSVC )
  572. # Allow for MSVC to debug ngspice from the build directory
  573. add_custom_command( TARGET eeschema_kiface POST_BUILD
  574. COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:eeschema_kiface>"
  575. )
  576. add_custom_command( TARGET eeschema_kiface POST_BUILD
  577. COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$<TARGET_FILE_DIR:eeschema_kiface>/ngspice"
  578. )
  579. endif()
  580. set_target_properties( eeschema_kiface PROPERTIES
  581. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  582. # _eeschema.so, _eeschema.dll, or _eeschema.kiface
  583. OUTPUT_NAME eeschema
  584. PREFIX ${KIFACE_PREFIX}
  585. SUFFIX ${KIFACE_SUFFIX}
  586. )
  587. # The KIFACE is in eeschema.cpp, export it:
  588. set_source_files_properties( eeschema.cpp PROPERTIES
  589. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  590. )
  591. # if building eeschema, then also build eeschema_kiface if out of date.
  592. add_dependencies( eeschema eeschema_kiface )
  593. # Generate link map with cross reference
  594. target_link_options( eeschema_kiface PRIVATE
  595. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=${KIFACE_PREFIX}eeschema${KIFACE_SUFFIX}.map>
  596. )
  597. target_link_options( eeschema PRIVATE
  598. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=eeschema.map>
  599. )
  600. # these 2 binaries are a matched set, keep them together:
  601. if( APPLE )
  602. set_target_properties( eeschema PROPERTIES
  603. MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/eeschema/Info.plist
  604. )
  605. # puts binaries into the *.app bundle while linking
  606. set_target_properties( eeschema_kiface PROPERTIES
  607. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  608. )
  609. set_target_properties( eeschema PROPERTIES INSTALL_RPATH
  610. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  611. set_target_properties( eeschema_kiface PROPERTIES INSTALL_RPATH
  612. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  613. set_target_properties( eeschema_kiface PROPERTIES BUILD_WITH_INSTALL_RPATH 1 )
  614. # put individual bundle outside of main bundle as a first step
  615. # will be pulled into the main bundle when creating main bundle
  616. install( TARGETS eeschema
  617. DESTINATION ${KICAD_BIN}
  618. COMPONENT binary
  619. )
  620. install( CODE "
  621. set( KICAD_CMAKE_MODULE_PATH \"${KICAD_CMAKE_MODULE_PATH}\" )
  622. set( KICAD_BIN \"${KICAD_BIN}\" )
  623. set( OSX_BUNDLE_INSTALL_BIN_DIR \"${OSX_BUNDLE_INSTALL_BIN_DIR}\" )
  624. set( OSX_BUNDLE_INSTALL_LIB_DIR \"${OSX_BUNDLE_INSTALL_LIB_DIR}\" )
  625. set( OSX_BUNDLE_BUILD_KIFACE_DIR \"${OSX_BUNDLE_BUILD_KIFACE_DIR}\" )
  626. " )
  627. # bundle libngspice and codemodels
  628. get_filename_component( ABS_LIBNGSPICE ${NGSPICE_LIBRARY} ABSOLUTE )
  629. get_filename_component( LIBNGSPICE_PATH ${ABS_LIBNGSPICE} DIRECTORY )
  630. install( DIRECTORY "${LIBNGSPICE_PATH}/"
  631. DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim"
  632. FILES_MATCHING PATTERN "*.dylib")
  633. install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice"
  634. DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" )
  635. install( CODE [[
  636. include( ${KICAD_CMAKE_MODULE_PATH}/InstallSteps/InstallMacOS.cmake )
  637. # Install any dependencies (this will generally duplicate kicad.app but we can't be sure)
  638. install_runtime_deps( "${KICAD_BIN}/eeschema.app/Contents/MacOS/eeschema"
  639. "${OSX_BUNDLE_BUILD_KIFACE_DIR}/_eeschema.kiface"
  640. ""
  641. )
  642. ]] )
  643. else()
  644. if( MSVC )
  645. target_sources( eeschema_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/eeschema-dll.rc )
  646. endif()
  647. install( TARGETS eeschema
  648. DESTINATION ${KICAD_BIN}
  649. COMPONENT binary
  650. )
  651. install( TARGETS eeschema_kiface
  652. # actual filename subject to change at milestone C)
  653. # modular-kicad blueprint.
  654. DESTINATION ${KICAD_KIFACE}
  655. COMPONENT binary
  656. )
  657. endif()
  658. if( KICAD_WIN32_INSTALL_PDBS )
  659. # Get the PDBs to copy over for MSVC
  660. install(FILES $<TARGET_PDB_FILE:eeschema> DESTINATION ${KICAD_BIN})
  661. install(FILES $<TARGET_PDB_FILE:eeschema_kiface> DESTINATION ${KICAD_KIFACE})
  662. endif()
  663. make_lexer(
  664. eeschema_kiface_objects
  665. dialogs/dialog_bom_cfg.keywords
  666. dialogs/dialog_bom_cfg_lexer.h
  667. dialogs/dialog_bom_cfg_keywords.cpp
  668. T_BOMCFG_T
  669. )
  670. make_lexer(
  671. eeschema_kiface_objects
  672. schematic.keywords
  673. schematic_lexer.h
  674. schematic_keywords.cpp
  675. TSCHEMATIC_T
  676. )
  677. add_subdirectory( python_scripts )