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.

497 lines
15 KiB

8 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
* 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. # .cpp files are compiled with extra ${WSHADOW_FLAGS}
  2. if( COMPILER_SUPPORTS_WSHADOW )
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSHADOW_FLAGS}")
  4. endif()
  5. add_definitions( -DEESCHEMA )
  6. if( KICAD_SPICE )
  7. set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
  8. # Find out the exact libngspice file name
  9. get_filename_component( NGSPICE_DLL_REALPATH "${NGSPICE_DLL}" REALPATH )
  10. get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_REALPATH}" NAME )
  11. set_property( SOURCE sim/ngspice.cpp
  12. APPEND PROPERTY COMPILE_DEFINITIONS
  13. NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}"
  14. )
  15. endif()
  16. include_directories( BEFORE ${INC_BEFORE} )
  17. include_directories(
  18. ./dialogs
  19. ./netlist_exporters
  20. ./widgets
  21. ./libedit
  22. ./libview
  23. ./tools
  24. ../common
  25. ../common/dialogs
  26. ${INC_AFTER}
  27. )
  28. set( EESCHEMA_DLGS
  29. dialogs/dialog_annotate.cpp
  30. dialogs/dialog_annotate_base.cpp
  31. dialogs/dialog_bom.cpp
  32. dialogs/dialog_bom_base.cpp
  33. dialogs/dialog_bom_cfg_keywords.cpp
  34. dialogs/dialog_bus_manager.cpp
  35. dialogs/dialog_fields_editor_global.cpp
  36. dialogs/dialog_fields_editor_global_base.cpp
  37. dialogs/dialog_choose_component.cpp
  38. dialogs/dialog_edit_component_in_lib.cpp
  39. dialogs/dialog_edit_component_in_lib_base.cpp
  40. dialogs/dialog_edit_component_in_schematic.cpp
  41. dialogs/dialog_edit_component_in_schematic_base.cpp
  42. dialogs/dialog_edit_components_libid.cpp
  43. dialogs/dialog_edit_components_libid_base.cpp
  44. dialogs/dialog_edit_label.cpp
  45. dialogs/dialog_edit_label_base.cpp
  46. dialogs/dialog_edit_line_style.cpp
  47. dialogs/dialog_edit_line_style_base.cpp
  48. dialogs/dialog_edit_one_field.cpp
  49. dialogs/dialog_erc.cpp
  50. dialogs/dialog_erc_base.cpp
  51. dialogs/dialog_global_sym_lib_table_config.cpp
  52. dialogs/dialog_lib_edit_draw_item.cpp
  53. dialogs/dialog_lib_edit_draw_item_base.cpp
  54. dialogs/dialog_lib_edit_pin.cpp
  55. dialogs/dialog_lib_edit_pin_base.cpp
  56. dialogs/dialog_lib_edit_pin_table.cpp
  57. dialogs/dialog_lib_edit_pin_table_base.cpp
  58. dialogs/dialog_lib_edit_text.cpp
  59. dialogs/dialog_lib_edit_text_base.cpp
  60. dialogs/dialog_lib_new_component.cpp
  61. dialogs/dialog_lib_new_component_base.cpp
  62. dialogs/dialog_migrate_buses.cpp
  63. dialogs/dialog_migrate_buses_base.cpp
  64. dialogs/dialog_netlist.cpp
  65. dialogs/dialog_netlist_base.cpp
  66. dialogs/dialog_plot_schematic.cpp
  67. dialogs/dialog_plot_schematic_base.cpp
  68. dialogs/dialog_print_using_printer.cpp
  69. dialogs/dialog_print_using_printer_base.cpp
  70. dialogs/dialog_rescue_each.cpp
  71. dialogs/dialog_rescue_each_base.cpp
  72. dialogs/dialog_sch_edit_sheet_pin.cpp
  73. dialogs/dialog_sch_edit_sheet_pin_base.cpp
  74. dialogs/dialog_sch_sheet_props.cpp
  75. dialogs/dialog_sch_sheet_props_base.cpp
  76. dialogs/dialog_schematic_find.cpp
  77. dialogs/dialog_schematic_find_base.cpp
  78. dialogs/dialog_set_grid.cpp
  79. dialogs/dialog_set_grid_base.cpp
  80. dialogs/dialog_symbol_remap.cpp
  81. dialogs/dialog_symbol_remap_base.cpp
  82. dialogs/dialog_update_fields.cpp
  83. dialogs/dialog_update_fields_base.cpp
  84. dialogs/panel_eeschema_template_fieldnames.cpp
  85. dialogs/panel_eeschema_template_fieldnames_base.cpp
  86. dialogs/panel_eeschema_display_options.cpp
  87. dialogs/panel_eeschema_display_options_base.cpp
  88. dialogs/panel_eeschema_settings.cpp
  89. dialogs/panel_eeschema_settings_base.cpp
  90. dialogs/panel_libedit_display_options.cpp
  91. dialogs/panel_libedit_settings.cpp
  92. dialogs/panel_libedit_settings_base.cpp
  93. dialogs/panel_sym_lib_table.cpp
  94. dialogs/panel_sym_lib_table_base.cpp
  95. )
  96. set( EESCHEMA_WIDGETS
  97. widgets/pin_shape_combobox.cpp
  98. widgets/pin_type_combobox.cpp
  99. widgets/symbol_preview_widget.cpp
  100. widgets/symbol_tree_pane.cpp
  101. widgets/widget_eeschema_color_config.cpp
  102. )
  103. set ( EESCHEMA_LIBEDIT_SRCS
  104. libedit/block_libedit.cpp
  105. libedit/controller.cpp
  106. libedit/libedit.cpp
  107. libedit/libedit_onleftclick.cpp
  108. libedit/libedit_onrightclick.cpp
  109. libedit/libedit_plot_component.cpp
  110. libedit/libedit_undo_redo.cpp
  111. libedit/lib_edit_frame.cpp
  112. libedit/libfield.cpp
  113. libedit/menubar_libedit.cpp
  114. libedit/pinedit.cpp
  115. libedit/symbdraw.cpp
  116. libedit/symbedit.cpp
  117. libedit/tool_lib.cpp
  118. libedit/lib_export.cpp
  119. libedit/lib_manager.cpp
  120. )
  121. set( EESCHEMA_SRCS
  122. ${EESCHEMA_DLGS}
  123. ${EESCHEMA_WIDGETS}
  124. ${EESCHEMA_LIBEDIT_SRCS}
  125. bom_plugins.cpp
  126. sch_view.cpp
  127. sch_painter.cpp
  128. annotate.cpp
  129. autoplace_fields.cpp
  130. backanno.cpp
  131. block.cpp
  132. bus_alias.cpp
  133. bus-wire-junction.cpp
  134. class_libentry.cpp
  135. class_library.cpp
  136. cmp_library_keywords.cpp
  137. cmp_library_lexer.cpp
  138. component_references_lister.cpp
  139. controle.cpp
  140. connection_graph.cpp
  141. cross-probing.cpp
  142. drc_erc_item.cpp
  143. edit_bitmap.cpp
  144. edit_component_in_schematic.cpp
  145. edit_label.cpp
  146. eeschema.cpp
  147. eeschema_config.cpp
  148. erc.cpp
  149. fields_grid_table.cpp
  150. files-io.cpp
  151. find.cpp
  152. generate_alias_info.cpp
  153. getpart.cpp
  154. hierarch.cpp
  155. hotkeys.cpp
  156. lib_arc.cpp
  157. lib_bezier.cpp
  158. lib_circle.cpp
  159. lib_draw_item.cpp
  160. lib_field.cpp
  161. lib_pin.cpp
  162. lib_polyline.cpp
  163. lib_rectangle.cpp
  164. lib_text.cpp
  165. libarch.cpp
  166. menubar.cpp
  167. netlist_generator.cpp
  168. netlist_object_list.cpp
  169. netlist_object.cpp
  170. pin_number.cpp
  171. pin_shape.cpp
  172. pin_type.cpp
  173. plot_schematic_DXF.cpp
  174. plot_schematic_HPGL.cpp
  175. plot_schematic_PDF.cpp
  176. plot_schematic_PS.cpp
  177. plot_schematic_SVG.cpp
  178. sch_draw_panel.cpp
  179. project_rescue.cpp
  180. sch_base_frame.cpp
  181. sch_bitmap.cpp
  182. sch_bus_entry.cpp
  183. sch_collectors.cpp
  184. sch_component.cpp
  185. sch_connection.cpp
  186. sch_eagle_plugin.cpp
  187. sch_field.cpp
  188. sch_io_mgr.cpp
  189. sch_item_struct.cpp
  190. sch_junction.cpp
  191. sch_legacy_plugin.cpp
  192. sch_line.cpp
  193. sch_marker.cpp
  194. sch_no_connect.cpp
  195. sch_pin.cpp
  196. sch_plugin.cpp
  197. sch_preview_panel.cpp
  198. sch_screen.cpp
  199. sch_sheet.cpp
  200. sch_sheet_path.cpp
  201. sch_sheet_pin.cpp
  202. sch_text.cpp
  203. sch_validators.cpp
  204. schematic_undo_redo.cpp
  205. sch_edit_frame.cpp
  206. selpart.cpp
  207. sheet.cpp
  208. symbol_lib_table.cpp
  209. symbol_tree_model_adapter.cpp
  210. symbol_tree_synchronizing_adapter.cpp
  211. template_fieldnames.cpp
  212. template_fieldnames_keywords.cpp
  213. tool_sch.cpp
  214. tool_viewlib.cpp
  215. transform.cpp
  216. viewlib_frame.cpp
  217. viewlibs.cpp
  218. netlist_exporters/netlist_exporter.cpp
  219. netlist_exporters/netlist_exporter_cadstar.cpp
  220. netlist_exporters/netlist_exporter_generic.cpp
  221. netlist_exporters/netlist_exporter_kicad.cpp
  222. netlist_exporters/netlist_exporter_orcadpcb2.cpp
  223. netlist_exporters/netlist_exporter_pspice.cpp
  224. tools/sch_actions.cpp
  225. tools/sch_drawing_tool.cpp
  226. tools/sch_edit_tool.cpp
  227. tools/sch_editor_control.cpp
  228. tools/sch_inspection_tool.cpp
  229. tools/sch_wire_bus_tool.cpp
  230. tools/sch_move_tool.cpp
  231. tools/sch_picker_tool.cpp
  232. tools/sch_selection_tool.cpp
  233. tools/selection.cpp
  234. )
  235. set( EESCHEMA_COMMON_SRCS
  236. ../common/dialogs/dialog_page_settings.cpp
  237. ../common/base_screen.cpp
  238. ../common/base_units.cpp
  239. ../common/eda_text.cpp
  240. ../common/page_info.cpp
  241. )
  242. if( KICAD_SPICE )
  243. set( EESCHEMA_SRCS
  244. ${EESCHEMA_SRCS}
  245. sim/netlist_exporter_pspice_sim.cpp
  246. sim/ngspice.cpp
  247. sim/sim_plot_frame.cpp
  248. sim/sim_plot_frame_base.cpp
  249. sim/sim_plot_panel.cpp
  250. sim/simulate.cpp
  251. sim/spice_simulator.cpp
  252. sim/spice_value.cpp
  253. simulation_cursors.cpp
  254. dialogs/dialog_signal_list.cpp
  255. dialogs/dialog_signal_list_base.cpp
  256. dialogs/dialog_sim_settings.cpp
  257. dialogs/dialog_sim_settings_base.cpp
  258. dialogs/dialog_spice_model.cpp
  259. dialogs/dialog_spice_model_base.cpp
  260. widgets/tuner_slider.cpp
  261. widgets/tuner_slider_base.cpp
  262. )
  263. endif()
  264. if( MINGW )
  265. # EESCHEMA_RESOURCES variable is set by the macro.
  266. mingw_resource_compiler( eeschema )
  267. else()
  268. set( EESCHEMA_RESOURCES eeschema.rc )
  269. endif()
  270. # Create a C++ compilable string initializer containing html text into a *.h file:
  271. add_custom_command(
  272. OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
  273. COMMAND ${CMAKE_COMMAND}
  274. -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
  275. -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
  276. -P ${CMAKE_MODULE_PATH}/Html2C.cmake
  277. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
  278. COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
  279. from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html"
  280. )
  281. set_source_files_properties( dialogs/dialog_bom.cpp
  282. PROPERTIES
  283. OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
  284. )
  285. if( APPLE )
  286. # setup bundle
  287. set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns )
  288. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns" PROPERTIES
  289. MACOSX_PACKAGE_LOCATION Resources
  290. )
  291. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema_doc.icns" PROPERTIES
  292. MACOSX_PACKAGE_LOCATION Resources
  293. )
  294. set( MACOSX_BUNDLE_ICON_FILE eeschema.icns )
  295. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
  296. set( MACOSX_BUNDLE_NAME eeschema )
  297. endif()
  298. add_executable( eeschema WIN32 MACOSX_BUNDLE
  299. ../common/single_top.cpp
  300. ../common/pgm_base.cpp
  301. ${EESCHEMA_RESOURCES}
  302. )
  303. set_source_files_properties( ../common/single_top.cpp PROPERTIES
  304. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_SCH;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL"
  305. )
  306. target_link_libraries( eeschema
  307. #singletop # replaces common, giving us restrictive control and link warnings.
  308. # There's way too much crap coming in from common yet.
  309. gal
  310. legacy_gal
  311. common
  312. ${wxWidgets_LIBRARIES}
  313. )
  314. # the DSO (KIFACE) housing the main eeschema code:
  315. add_library( eeschema_kiface SHARED
  316. ${EESCHEMA_SRCS}
  317. ${EESCHEMA_COMMON_SRCS}
  318. )
  319. target_link_libraries( eeschema_kiface
  320. gal
  321. legacy_gal
  322. common
  323. ${wxWidgets_LIBRARIES}
  324. ${GDI_PLUS_LIBRARIES}
  325. )
  326. target_include_directories( eeschema_kiface PUBLIC
  327. ${CMAKE_CURRENT_SOURCE_DIR}
  328. )
  329. if( KICAD_SPICE )
  330. target_link_libraries( eeschema_kiface
  331. ${NGSPICE_LIBRARY}
  332. )
  333. endif()
  334. set_target_properties( eeschema_kiface PROPERTIES
  335. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  336. # _eeschema.so, _eeschema.dll, or _eeschema.kiface
  337. OUTPUT_NAME eeschema
  338. PREFIX ${KIFACE_PREFIX}
  339. SUFFIX ${KIFACE_SUFFIX}
  340. )
  341. # The KIFACE is in eeschema.cpp, export it:
  342. set_source_files_properties( eeschema.cpp PROPERTIES
  343. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  344. )
  345. # if building eeschema, then also build eeschema_kiface if out of date.
  346. add_dependencies( eeschema eeschema_kiface )
  347. if( MAKE_LINK_MAPS )
  348. # generate link map with cross reference
  349. set_target_properties( eeschema_kiface PROPERTIES
  350. LINK_FLAGS "-Wl,-cref,-Map=${KIFACE_PREFIX}eeschema${KIFACE_SUFFIX}.map"
  351. )
  352. set_target_properties( eeschema PROPERTIES
  353. LINK_FLAGS "-Wl,-cref,-Map=eeschema.map"
  354. )
  355. endif()
  356. # these 2 binaries are a matched set, keep them together:
  357. if( APPLE )
  358. set_target_properties( eeschema PROPERTIES
  359. MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
  360. )
  361. # puts binaries into the *.app bundle while linking
  362. set_target_properties( eeschema_kiface PROPERTIES
  363. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  364. )
  365. # put individual bundle outside of main bundle as a first step
  366. # will be pulled into the main bundle when creating main bundle
  367. install( TARGETS eeschema
  368. DESTINATION ${KICAD_BIN}
  369. COMPONENT binary
  370. )
  371. install( CODE "
  372. # override default embedded path settings
  373. ${OSX_BUNDLE_OVERRIDE_PATHS}
  374. # do all the work
  375. include( BundleUtilities )
  376. fixup_bundle( ${KICAD_BIN}/eeschema.app/Contents/MacOS/eeschema
  377. \"\"
  378. \"\"
  379. )
  380. " COMPONENT Runtime
  381. )
  382. if( KICAD_SPICE )
  383. # bundle libngspice, codemodels and scripts
  384. get_filename_component( REAL_LIBNGSPICE ${NGSPICE_LIBRARY} REALPATH )
  385. get_filename_component( LIBNGSPICE_PATH ${REAL_LIBNGSPICE} DIRECTORY )
  386. install( FILES "${REAL_LIBNGSPICE}"
  387. DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" )
  388. install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice"
  389. DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" )
  390. install( DIRECTORY "${LIBNGSPICE_PATH}/../share/ngspice/scripts"
  391. DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim/ngspice" )
  392. endif()
  393. else()
  394. install( TARGETS eeschema
  395. DESTINATION ${KICAD_BIN}
  396. COMPONENT binary
  397. )
  398. install( TARGETS eeschema_kiface
  399. # actual filename subject to change at milestone C)
  400. # modular-kicad blueprint.
  401. DESTINATION ${KICAD_BIN}
  402. COMPONENT binary
  403. )
  404. endif()
  405. # auto-generate cmp_library_lexer.h and cmp_library_keywords.cpp for the component
  406. # library format.
  407. make_lexer(
  408. ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords
  409. ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_lexer.h
  410. ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp
  411. TLIB_T
  412. )
  413. add_custom_target(
  414. cmp_library_lexer_source_files ALL
  415. DEPENDS
  416. ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_lexer.h
  417. ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp
  418. )
  419. add_dependencies( eeschema_kiface cmp_library_lexer_source_files )
  420. make_lexer(
  421. ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords
  422. ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_lexer.h
  423. ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp
  424. TFIELD_T
  425. # Pass header file with dependency on *_lexer.h as extra_arg
  426. template_fieldnames.h
  427. )
  428. add_custom_target(
  429. field_template_lexer_source_files ALL
  430. DEPENDS
  431. ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_lexer.h
  432. ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp
  433. )
  434. add_dependencies( eeschema_kiface field_template_lexer_source_files )
  435. make_lexer(
  436. ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_cfg.keywords
  437. ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_cfg_lexer.h
  438. ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_cfg_keywords.cpp
  439. T_BOMCFG_T
  440. # Pass header file with dependency on *_lexer.h as extra_arg
  441. dialogs/dialog_bom_cfg.h
  442. )
  443. add_custom_target(
  444. dialog_bom_cfg_lexer_source_files ALL
  445. DEPENDS
  446. ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_cfg_lexer.h
  447. ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_cfg_keywords.cpp
  448. )
  449. add_dependencies( eeschema_kiface dialog_bom_cfg_lexer_source_files )
  450. add_subdirectory( plugins )