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.

964 lines
34 KiB

5 years ago
1 year ago
18 years ago
18 years ago
8 years ago
8 years ago
8 years ago
8 years ago
18 years ago
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
* 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
* 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_compile_definitions( PCBNEW )
  2. add_subdirectory(connectivity)
  3. add_subdirectory(router)
  4. # psnrouter depends on make_lexer outputs in common (bug #1285878 )
  5. add_dependencies( pnsrouter pcbcommon )
  6. file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swig )
  7. # Infrequently needed headers go at end of search paths, append to INC_AFTER
  8. set( INC_AFTER ${INC_AFTER} python/scripting )
  9. set( INC_AFTER ${INC_AFTER} ${CMAKE_SOURCE_DIR}/common/swig )
  10. include_directories( BEFORE ${INC_BEFORE} )
  11. include_directories(
  12. ./dialogs
  13. ./autorouter
  14. ./generators
  15. ${CMAKE_SOURCE_DIR}/3d-viewer
  16. ${CMAKE_SOURCE_DIR}/3d-viewer/dialogs
  17. ${CMAKE_SOURCE_DIR}/common
  18. ${CMAKE_SOURCE_DIR}/common/dialogs
  19. ./exporters
  20. ./importers
  21. ${CMAKE_SOURCE_DIR}/utils/idftools
  22. ./specctra_import_export
  23. ${INC_AFTER}
  24. )
  25. set( PCBNEW_DIALOGS
  26. dialogs/dialog_filter_selection.cpp
  27. dialogs/dialog_filter_selection_base.cpp
  28. dialogs/dialog_board_setup.cpp
  29. dialogs/dialog_board_statistics.cpp
  30. dialogs/dialog_board_statistics_base.cpp
  31. dialogs/dialog_board_reannotate.cpp
  32. dialogs/dialog_board_reannotate_base.cpp
  33. dialogs/dialog_cleanup_graphics.cpp
  34. dialogs/dialog_cleanup_graphics_base.cpp
  35. dialogs/dialog_cleanup_tracks_and_vias.cpp
  36. dialogs/dialog_cleanup_tracks_and_vias_base.cpp
  37. dialogs/dialog_copper_zones.cpp
  38. dialogs/dialog_copper_zones_base.cpp
  39. dialogs/dialog_create_array.cpp
  40. dialogs/dialog_create_array_base.cpp
  41. dialogs/dialog_dimension_properties.cpp
  42. dialogs/dialog_dimension_properties_base.cpp
  43. dialogs/dialog_drc.cpp
  44. dialogs/dialog_drc_base.cpp
  45. dialogs/dialog_drc_job_config.cpp
  46. dialogs/dialog_footprint_associations.cpp
  47. dialogs/dialog_footprint_associations_base.cpp
  48. dialogs/dialog_footprint_checker.cpp
  49. dialogs/dialog_footprint_checker_base.cpp
  50. dialogs/dialog_footprint_properties.cpp
  51. dialogs/dialog_footprint_properties_base.cpp
  52. dialogs/dialog_footprint_properties_fp_editor.cpp
  53. dialogs/dialog_footprint_properties_fp_editor_base.cpp
  54. dialogs/dialog_enum_pads.cpp
  55. dialogs/dialog_enum_pads_base.cpp
  56. dialogs/dialog_exchange_footprints.cpp
  57. dialogs/dialog_exchange_footprints_base.cpp
  58. dialogs/dialog_export_2581.cpp
  59. dialogs/dialog_export_2581_base.cpp
  60. dialogs/dialog_export_idf.cpp
  61. dialogs/dialog_export_idf_base.cpp
  62. dialogs/dialog_export_step.cpp
  63. dialogs/dialog_export_odbpp.cpp
  64. dialogs/dialog_export_odbpp_base.cpp
  65. dialogs/dialog_export_step_base.cpp
  66. dialogs/dialog_export_step_process.cpp
  67. dialogs/dialog_export_step_process_base.cpp
  68. dialogs/dialog_export_vrml.cpp
  69. dialogs/dialog_export_vrml_base.cpp
  70. dialogs/dialog_find.cpp
  71. dialogs/dialog_find_base.cpp
  72. dialogs/dialog_footprint_wizard_list.cpp
  73. dialogs/dialog_footprint_wizard_list_base.cpp
  74. dialogs/dialog_gen_footprint_position.cpp
  75. dialogs/dialog_gen_footprint_position_file_base.cpp
  76. dialogs/dialog_gencad_export_options.cpp
  77. dialogs/dialog_gendrill.cpp
  78. dialogs/dialog_gendrill_base.cpp
  79. dialogs/dialog_generators.cpp
  80. dialogs/dialog_generators_base.cpp
  81. dialogs/dialog_get_footprint_by_name.cpp
  82. dialogs/dialog_get_footprint_by_name_base.cpp
  83. dialogs/dialog_global_deletion.cpp
  84. dialogs/dialog_global_deletion_base.cpp
  85. dialogs/dialog_global_edit_tracks_and_vias.cpp
  86. dialogs/dialog_global_edit_tracks_and_vias_base.cpp
  87. dialogs/dialog_global_edit_teardrops.cpp
  88. dialogs/dialog_global_edit_teardrops_base.cpp
  89. dialogs/dialog_global_edit_text_and_graphics.cpp
  90. dialogs/dialog_global_edit_text_and_graphics_base.cpp
  91. dialogs/dialog_global_fp_lib_table_config.cpp
  92. dialogs/dialog_group_properties.cpp
  93. dialogs/dialog_group_properties_base.cpp
  94. dialogs/dialog_push_pad_properties.cpp
  95. dialogs/dialog_push_pad_properties_base.cpp
  96. dialogs/dialog_shape_properties.cpp
  97. dialogs/dialog_shape_properties_base.cpp
  98. dialogs/dialog_reference_image_properties.cpp
  99. dialogs/dialog_reference_image_properties_base.cpp
  100. dialogs/dialog_import_settings.cpp
  101. dialogs/dialog_import_settings_base.cpp
  102. dialogs/dialog_imported_layers_base.cpp
  103. dialogs/dialog_map_layers.cpp
  104. dialogs/dialog_rule_area_properties.cpp
  105. dialogs/dialog_rule_area_properties_base.cpp
  106. dialogs/dialog_layer_selection_base.cpp
  107. dialogs/dialog_move_exact.cpp
  108. dialogs/dialog_move_exact_base.cpp
  109. dialogs/dialog_import_netlist.cpp
  110. dialogs/dialog_import_netlist_base.cpp
  111. dialogs/dialog_non_copper_zones_properties.cpp
  112. dialogs/dialog_non_copper_zones_properties_base.cpp
  113. dialogs/dialog_outset_items.cpp
  114. dialogs/dialog_outset_items_base.cpp
  115. dialogs/dialog_pad_properties.cpp
  116. dialogs/dialog_pad_properties_base.cpp
  117. dialogs/dialog_plot.cpp
  118. dialogs/dialog_plot_base.cpp
  119. dialogs/dialog_pns_diff_pair_dimensions.cpp
  120. dialogs/dialog_pns_diff_pair_dimensions_base.cpp
  121. dialogs/dialog_pns_settings.cpp
  122. dialogs/dialog_pns_settings_base.cpp
  123. dialogs/dialog_position_relative.cpp
  124. dialogs/dialog_position_relative_base.cpp
  125. dialogs/dialog_print_pcbnew.cpp
  126. dialogs/dialog_render_job_base.cpp
  127. dialogs/dialog_render_job.cpp
  128. dialogs/dialog_set_offset_base.cpp
  129. dialogs/dialog_set_offset.cpp
  130. dialogs/dialog_swap_layers.cpp
  131. dialogs/dialog_swap_layers_base.cpp
  132. dialogs/dialog_table_properties.cpp
  133. dialogs/dialog_table_properties_base.cpp
  134. dialogs/dialog_tablecell_properties.cpp
  135. dialogs/dialog_tablecell_properties_base.cpp
  136. dialogs/dialog_target_properties.cpp
  137. dialogs/dialog_target_properties_base.cpp
  138. dialogs/dialog_text_properties.cpp
  139. dialogs/dialog_text_properties_base.cpp
  140. dialogs/dialog_textbox_properties.cpp
  141. dialogs/dialog_textbox_properties_base.cpp
  142. dialogs/dialog_track_via_properties.cpp
  143. dialogs/dialog_track_via_properties_base.cpp
  144. dialogs/dialog_track_via_size.cpp
  145. dialogs/dialog_track_via_size_base.cpp
  146. dialogs/dialog_tuning_pattern_properties.cpp
  147. dialogs/dialog_tuning_pattern_properties_base.cpp
  148. dialogs/dialog_unused_pad_layers.cpp
  149. dialogs/dialog_unused_pad_layers_base.cpp
  150. dialogs/dialog_update_pcb.cpp
  151. dialogs/dialog_update_pcb_base.cpp
  152. dialogs/dialog_multichannel_generate_rule_areas_base.cpp
  153. dialogs/dialog_multichannel_generate_rule_areas.cpp
  154. dialogs/dialog_multichannel_repeat_layout_base.cpp
  155. dialogs/dialog_multichannel_repeat_layout.cpp
  156. dialogs/panel_pcb_display_options.cpp
  157. dialogs/panel_pcb_display_options_base.cpp
  158. dialogs/panel_edit_options.cpp
  159. dialogs/panel_edit_options_base.cpp
  160. dialogs/panel_fp_lib_table.cpp
  161. dialogs/panel_fp_lib_table_base.cpp
  162. dialogs/panel_fp_editor_color_settings.cpp
  163. dialogs/panel_fp_editor_field_defaults.cpp
  164. dialogs/panel_fp_editor_field_defaults_base.cpp
  165. dialogs/panel_fp_editor_graphics_defaults.cpp
  166. dialogs/panel_fp_editor_graphics_defaults_base.cpp
  167. dialogs/panel_fp_properties_3d_model.cpp
  168. dialogs/panel_fp_properties_3d_model_base.cpp
  169. dialogs/panel_pcbnew_action_plugins.cpp
  170. dialogs/panel_pcbnew_action_plugins_base.cpp
  171. dialogs/panel_pcbnew_color_settings.cpp
  172. dialogs/panel_pcbnew_display_origin.cpp
  173. dialogs/panel_pcbnew_display_origin_base.cpp
  174. dialogs/panel_rule_area_properties_keepout_base.cpp
  175. dialogs/panel_rule_area_properties_placement_base.cpp
  176. dialogs/panel_setup_constraints.cpp
  177. dialogs/panel_setup_constraints_base.cpp
  178. dialogs/panel_setup_dimensions.cpp
  179. dialogs/panel_setup_dimensions_base.cpp
  180. dialogs/panel_setup_formatting.cpp
  181. dialogs/panel_setup_formatting_base.cpp
  182. dialogs/panel_setup_mask_and_paste.cpp
  183. dialogs/panel_setup_mask_and_paste_base.cpp
  184. dialogs/panel_setup_layers.cpp
  185. dialogs/panel_setup_layers_base.cpp
  186. dialogs/panel_setup_rules.cpp
  187. dialogs/panel_setup_rules_base.cpp
  188. dialogs/panel_setup_teardrops.cpp
  189. dialogs/panel_setup_teardrops_base.cpp
  190. dialogs/panel_setup_text_and_graphics.cpp
  191. dialogs/panel_setup_text_and_graphics_base.cpp
  192. dialogs/panel_setup_tracks_and_vias.cpp
  193. dialogs/panel_setup_tracks_and_vias_base.cpp
  194. dialogs/panel_setup_tuning_patterns.cpp
  195. dialogs/panel_setup_tuning_patterns_base.cpp
  196. footprint_wizard.cpp
  197. footprint_wizard_frame.cpp
  198. footprint_wizard_frame_functions.cpp
  199. )
  200. set( PCBNEW_BRDSTACKUP_MGR
  201. board_stackup_manager/dielectric_material.cpp
  202. board_stackup_manager/stackup_predefined_prms.cpp
  203. board_stackup_manager/panel_board_finish.cpp
  204. board_stackup_manager/panel_board_finish_base.cpp
  205. board_stackup_manager/panel_board_stackup.cpp
  206. board_stackup_manager/panel_board_stackup_base.cpp
  207. board_stackup_manager/board_stackup_reporter.cpp
  208. board_stackup_manager/dialog_dielectric_list_manager_base.cpp
  209. board_stackup_manager/dialog_dielectric_list_manager.cpp
  210. )
  211. set( PCBNEW_IMPORT_GFX
  212. import_gfx/dialog_import_graphics.cpp
  213. import_gfx/dialog_import_graphics_base.cpp
  214. import_gfx/graphics_importer_pcbnew.cpp
  215. )
  216. set( PCBNEW_EXPORTERS
  217. exporters/export_hyperlynx.cpp
  218. exporters/export_d356.cpp
  219. exporters/export_footprint_associations.cpp
  220. exporters/export_gencad.cpp
  221. exporters/export_gencad_writer.cpp
  222. exporters/export_idf.cpp
  223. exporters/export_svg.cpp
  224. exporters/step/exporter_step.cpp
  225. exporters/step/step_pcb_model.cpp
  226. exporters/step/KI_XCAFDoc_AssemblyGraph.cxx
  227. exporters/exporter_vrml.cpp
  228. exporters/place_file_exporter.cpp
  229. exporters/gen_drill_report_files.cpp
  230. exporters/gendrill_Excellon_writer.cpp
  231. exporters/gendrill_file_writer_base.cpp
  232. exporters/gendrill_gerber_writer.cpp
  233. exporters/gerber_jobfile_writer.cpp
  234. exporters/gerber_placefile_writer.cpp
  235. )
  236. set( PCBNEW_MICROWAVE_SRCS
  237. microwave/microwave_footprint.cpp
  238. microwave/microwave_inductor.cpp
  239. microwave/microwave_polygon.cpp
  240. microwave/microwave_tool.cpp
  241. )
  242. set( PCBNEW_GENERATORS_SRCS
  243. generators/pcb_tuning_pattern.cpp
  244. )
  245. set( PCBNEW_DRC_SRCS
  246. drc/drc_interactive_courtyard_clearance.cpp
  247. drc/drc_creepage_utils.cpp
  248. drc/drc_report.cpp
  249. drc/drc_test_provider.cpp
  250. drc/drc_test_provider_annular_width.cpp
  251. drc/drc_test_provider_disallow.cpp
  252. drc/drc_test_provider_clearance_base.cpp
  253. drc/drc_test_provider_creepage.cpp
  254. drc/drc_test_provider_connectivity.cpp
  255. drc/drc_test_provider_connection_width.cpp
  256. drc/drc_test_provider_copper_clearance.cpp
  257. drc/drc_test_provider_physical_clearance.cpp
  258. drc/drc_test_provider_courtyard_clearance.cpp
  259. drc/drc_test_provider_edge_clearance.cpp
  260. drc/drc_test_provider_footprint_checks.cpp
  261. drc/drc_test_provider_hole_to_hole.cpp
  262. drc/drc_test_provider_hole_size.cpp
  263. drc/drc_test_provider_library_parity.cpp
  264. drc/drc_test_provider_schematic_parity.cpp
  265. drc/drc_test_provider_misc.cpp
  266. drc/drc_test_provider_text_dims.cpp
  267. drc/drc_test_provider_track_angle.cpp
  268. drc/drc_test_provider_track_width.cpp
  269. drc/drc_test_provider_track_segment_length.cpp
  270. drc/drc_test_provider_zone_connections.cpp
  271. drc/drc_test_provider_via_diameter.cpp
  272. drc/drc_test_provider_solder_mask.cpp
  273. drc/drc_test_provider_silk_clearance.cpp
  274. drc/drc_test_provider_matched_length.cpp
  275. drc/drc_test_provider_diff_pair_coupling.cpp
  276. drc/drc_test_provider_sliver_checker.cpp
  277. drc/drc_test_provider_text_mirroring.cpp
  278. )
  279. set( PCBNEW_NETLIST_SRCS
  280. netlist_reader/board_netlist_updater.cpp
  281. netlist_reader/netlist.cpp
  282. )
  283. set( ZONE_MANAGER_SRCS
  284. zone_manager/board_edges_bounding_item.cpp
  285. zone_manager/dialog_zone_manager.cpp
  286. zone_manager/dialog_zone_manager_base.cpp
  287. zone_manager/model_zones_overview_table.cpp
  288. zone_manager/pane_zone_viewer.cpp
  289. zone_manager/panel_zone_gal.cpp
  290. zone_manager/panel_zone_properties.cpp
  291. zone_manager/panel_zone_properties_base.cpp
  292. zone_manager/zone_manager_preference.cpp
  293. zone_manager/zone_painter.cpp
  294. zone_manager/zones_container.cpp
  295. )
  296. set( PCBNEW_CLASS_SRCS
  297. ${PCBNEW_DIALOGS}
  298. ${PCBNEW_EXPORTERS}
  299. ${PCBNEW_GENERATORS_SRCS}
  300. ${PCBNEW_DRC_SRCS}
  301. ${PCBNEW_IMPORT_GFX}
  302. ${PCBNEW_NETLIST_SRCS}
  303. ${ZONE_MANAGER_SRCS}
  304. ${PCBNEW_BRDSTACKUP_MGR}
  305. autorouter/spread_footprints.cpp
  306. autorouter/ar_autoplacer.cpp
  307. autorouter/ar_matrix.cpp
  308. autorouter/autoplace_tool.cpp
  309. action_plugin.cpp
  310. array_pad_number_provider.cpp
  311. build_BOM_from_board.cpp
  312. cleanup_item.cpp
  313. component_class_manager.cpp
  314. convert_shape_list_to_polygon.cpp
  315. cross-probing.cpp
  316. edit.cpp
  317. edit_track_width.cpp
  318. files.cpp
  319. footprint_info_impl.cpp
  320. footprint_wizard.cpp
  321. footprint_editor_utils.cpp
  322. footprint_editor_settings.cpp
  323. fp_tree_synchronizing_adapter.cpp
  324. footprint_chooser_frame.cpp
  325. footprint_edit_frame.cpp
  326. footprint_libraries_utils.cpp
  327. footprint_viewer_frame.cpp
  328. fp_tree_model_adapter.cpp
  329. generate_footprint_info.cpp
  330. graphics_cleaner.cpp
  331. grid_layer_box_helpers.cpp
  332. grid_layer_box_helpers.h
  333. initpcb.cpp
  334. layer_pairs.cpp
  335. load_select_footprint.cpp
  336. menubar_footprint_editor.cpp
  337. menubar_pcb_editor.cpp
  338. pcb_base_edit_frame.cpp
  339. pcb_layer_box_selector.cpp
  340. pcb_edit_frame.cpp
  341. pcb_plotter.cpp
  342. pcbnew_config.cpp
  343. pcbnew_jobs_handler.cpp
  344. pcbnew_printout.cpp
  345. pcbnew_settings.cpp
  346. pcbplot.cpp
  347. plot_board_layers.cpp
  348. plot_brditems_plotter.cpp
  349. specctra_import_export/specctra.cpp
  350. specctra_import_export/specctra_export.cpp
  351. specctra_import_export/specctra_import.cpp
  352. pcb_fields_grid_table.cpp
  353. toolbars_footprint_editor.cpp
  354. toolbars_footprint_viewer.cpp
  355. toolbars_footprint_wizard.cpp
  356. toolbars_pcb_editor.cpp
  357. tracks_cleaner.cpp
  358. undo_redo.cpp
  359. zone_filler.cpp
  360. edit_zone_helpers.cpp
  361. ratsnest/ratsnest.cpp
  362. tools/array_tool.cpp
  363. tools/board_editor_control.cpp
  364. tools/board_inspection_tool.cpp
  365. tools/board_reannotate_tool.cpp
  366. tools/convert_tool.cpp
  367. tools/drawing_tool.cpp
  368. tools/drawing_stackup_table_tool.cpp
  369. tools/drc_tool.cpp
  370. tools/edit_tool.cpp
  371. tools/edit_tool_move_fct.cpp
  372. tools/pcb_edit_table_tool.cpp
  373. tools/global_edit_tool.cpp
  374. tools/group_tool.cpp
  375. tools/footprint_editor_control.cpp
  376. tools/footprint_chooser_selection_tool.cpp
  377. tools/item_modification_routine.cpp
  378. tools/pad_tool.cpp
  379. tools/pcb_control.cpp
  380. tools/pcb_picker_tool.cpp
  381. tools/pcb_selection.cpp
  382. tools/pcb_selection_conditions.cpp
  383. tools/pcb_selection_tool.cpp
  384. tools/pcb_tool_base.cpp
  385. tools/placement_tool.cpp
  386. tools/pcb_point_editor.cpp
  387. tools/pcb_tool_utils.cpp
  388. tools/position_relative_tool.cpp
  389. tools/tool_event_utils.cpp
  390. tools/zone_create_helper.cpp
  391. tools/zone_filler_tool.cpp
  392. tools/generator_tool.cpp
  393. tools/generator_tool_pns_proxy.cpp
  394. tools/multichannel_tool.cpp
  395. footprint_preview_panel.cpp
  396. footprint_tree_pane.cpp
  397. widgets/appearance_controls.cpp
  398. widgets/appearance_controls_base.cpp
  399. widgets/panel_footprint_chooser.cpp
  400. widgets/panel_selection_filter.cpp
  401. widgets/panel_selection_filter_base.cpp
  402. widgets/pcb_properties_panel.cpp
  403. widgets/pcb_search_pane.cpp
  404. widgets/search_handlers.cpp
  405. widgets/net_inspector_panel.cpp
  406. widgets/pcb_net_inspector_panel.cpp
  407. )
  408. set( PCBNEW_GIT_SRCS
  409. git/kigit_pcb_merge.cpp
  410. )
  411. set( PCBNEW_SRCS
  412. ${PCBNEW_MICROWAVE_SRCS}
  413. ${PCBNEW_CLASS_SRCS}
  414. ${PCBNEW_DIALOGS}
  415. ${PCBNEW_GIT_SRCS}
  416. )
  417. # extra sources from common
  418. set( PCBNEW_COMMON_SRCS
  419. )
  420. set( PCBNEW_SCRIPTING_PYTHON_HELPERS
  421. ${CMAKE_SOURCE_DIR}/common/swig/wx_python_helpers.cpp
  422. python/scripting/pcbnew_action_plugins.cpp
  423. python/scripting/pcbnew_footprint_wizards.cpp
  424. python/scripting/pcbnew_scripting_helpers.cpp
  425. python/scripting/pcbnew_scripting.cpp
  426. python/scripting/pcbnew_utils_3d.cpp
  427. python/scripting/pcb_scripting_tool.cpp
  428. )
  429. if( KICAD_IPC_API )
  430. set( PCBNEW_SRCS ${PCBNEW_SRCS}
  431. api/api_handler_pcb.cpp
  432. )
  433. endif()
  434. if( COMPILER_SUPPORTS_WARNINGS )
  435. # Only compile our source files with the warnings, since the SWIG generated
  436. # files contain a lot of warnings, we just ignore it.
  437. set_source_files_properties(
  438. ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  439. PROPERTIES COMPILE_FLAGS ${WARN_FLAGS_CXX}
  440. )
  441. endif()
  442. # Disable all warnings for the SWIG file
  443. if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
  444. if( MSYS )
  445. # For some reason the .cxx file generated by SWIG cannot be linked if compiled with debug options:
  446. # it creates a *lot* of not found symbols. So compile it with release mode
  447. set_source_files_properties( pcbnew_wrap.cxx PROPERTIES COMPILE_FLAGS "-O2 -w" )
  448. else()
  449. set_source_files_properties( pcbnew_wrap.cxx PROPERTIES COMPILE_FLAGS "-w" )
  450. endif()
  451. endif()
  452. set( PCBNEW_SCRIPTING_SRCS
  453. pcbnew_wrap.cxx
  454. ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  455. )
  456. set( SWIG_FLAGS
  457. -I${CMAKE_CURRENT_SOURCE_DIR}
  458. -I${CMAKE_SOURCE_DIR}/include
  459. -I${CMAKE_SOURCE_DIR}/scripting
  460. -I${CMAKE_SOURCE_DIR}/pcbnew/python/scripting
  461. -I${CMAKE_SOURCE_DIR}/common/swig
  462. -I${CMAKE_SOURCE_DIR}/libs/core/include
  463. -I${CMAKE_SOURCE_DIR}/libs/kimath/include
  464. -I${CMAKE_BINARY_DIR}
  465. )
  466. if( DEBUG )
  467. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  468. endif()
  469. # collect CFLAGS , and pass them to swig later
  470. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  471. foreach( d ${DirDefs} )
  472. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  473. endforeach()
  474. # We deliberately do not use the CMake support for swig here,
  475. # i.e. swig_add_footprint()) because we want full control.
  476. # Avoid threading in SWIG (breaks threads in pcbnew)
  477. set( SWIG_OPTS -python -c++ -nothreads -fastdispatch -fvirtual )
  478. set( SWIG_OPTS ${SWIG_OPTS} -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
  479. # Avoid "nothing known about base class" warning output
  480. set( SWIG_OPTS ${SWIG_OPTS} -w401 -w402 )
  481. if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
  482. set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
  483. set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
  484. endif()
  485. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
  486. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  487. DEPENDS python/swig/pcbnew.i
  488. DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.d
  489. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
  490. # Make docstrings.i available if it doesn't exist
  491. COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i
  492. COMMAND ${SWIG_EXECUTABLE}
  493. ${SWIG_OPTS} -MMD -MF ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.d -MT pcbnew/pcbnew_wrap.cxx -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx ${CMAKE_SOURCE_DIR}/pcbnew/python/swig/pcbnew.i
  494. # was needed only with SWIG version < 4 to disable a python section "def swig_import_helper()"
  495. # found in pcbnew.py but not existing in SWIG version >= 4
  496. # So it is left here for documentation purpose
  497. #COMMAND ${PYTHON_EXECUTABLE}
  498. # ${CMAKE_SOURCE_DIR}/tools/build/fix_swig_imports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  499. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
  500. )
  501. if( UNIX AND NOT APPLE )
  502. list( APPEND PCBNEW_EXTRA_LIBS rt )
  503. endif()
  504. ###
  505. # Doxygen python documentation
  506. ###
  507. if( DOXYGEN_FOUND )
  508. # create XML files from doxygen parsing
  509. add_custom_target( doxygen-python-xml
  510. ${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
  511. COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
  512. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  513. DEPENDS Doxyfile_xml
  514. COMMENT "building doxygen docs into directory doxygen-python/html"
  515. )
  516. add_dependencies( doxygen-python-xml version_header )
  517. # create .i files from XML doxygen parsing, docstrings.i will include all of them
  518. add_custom_target( xml-to-docstrings
  519. COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
  520. COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
  521. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/build/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
  522. COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
  523. COMMENT "building docstring files"
  524. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  525. DEPENDS pcbnew.py
  526. )
  527. add_dependencies( xml-to-docstrings doxygen-python-xml )
  528. # The sources to give to the Python Doxygen target
  529. set( DOXYGEN_PYTHON_SOURCES
  530. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  531. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/FootprintWizardBase.py
  532. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/PadArray.py )
  533. # The Doxyfile expects a space-separated list in the env var
  534. string(REPLACE ";" " " DOXYGEN_PYTHON_SOURCES_STR "${DOXYGEN_PYTHON_SOURCES}")
  535. # Create doxygen-python html
  536. add_custom_target( doxygen-python
  537. ${CMAKE_COMMAND} -E remove_directory doxygen-python
  538. COMMAND ${CMAKE_COMMAND} -E env
  539. PYTHON_SOURCES_TO_DOC=${DOXYGEN_PYTHON_SOURCES_STR}
  540. CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
  541. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
  542. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  543. DEPENDS Doxyfile_python
  544. DEPENDS ${DOXYGEN_PYTHON_SOURCES}
  545. COMMENT "building doxygen docs into directory doxygen-python/html"
  546. )
  547. add_dependencies( doxygen-python version_header xml-to-docstrings )
  548. endif()
  549. if( WIN32 )
  550. if( MINGW )
  551. # PCBNEW_RESOURCES variable is set by the macro.
  552. mingw_resource_compiler( pcbnew )
  553. else()
  554. set( PCBNEW_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/pcbnew.rc )
  555. endif()
  556. endif()
  557. # Function to process a markdown (.md) file into a header (.h) file
  558. function(callMrkdn2C inFile outFile)
  559. add_custom_command(
  560. OUTPUT "${outFile}"
  561. COMMAND ${CMAKE_COMMAND} -DinputFile="${inFile}" -DoutputFile="${outFile}" -P "${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake"
  562. DEPENDS "${inFile}" "${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake"
  563. COMMENT "Generating header: ${outFile}"
  564. )
  565. endfunction()
  566. # Locate all .md files in the specified directory
  567. file(GLOB markdownFiles ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_*.md)
  568. # Create a custom target to generate all .h files
  569. add_custom_target(generate_headers ALL)
  570. # Loop over all .md files and convert them into .h files in the same directory as the .md files
  571. foreach(file ${markdownFiles})
  572. # Extract the filename without extension and define output path in the same folder as the .md file
  573. get_filename_component(filename "${file}" NAME_WE)
  574. set(outputHeader "${CMAKE_CURRENT_SOURCE_DIR}/dialogs/${filename}.h")
  575. # Call the custom function to process the file
  576. callMrkdn2C("${file}" "${outputHeader}")
  577. # Create a per-file custom target and add it as a dependency
  578. add_custom_target(${filename}_gen DEPENDS "${outputHeader}")
  579. add_dependencies(generate_headers ${filename}_gen)
  580. # Mark the output header as a dependency of the source file
  581. set_source_files_properties(dialogs/panel_setup_rules.cpp
  582. PROPERTIES OBJECT_DEPENDS "${outputHeader}")
  583. endforeach()
  584. if( APPLE )
  585. # setup bundle
  586. set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns fpedit.icns fpedit_doc.icns )
  587. set_source_files_properties(
  588. "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns"
  589. "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns"
  590. "${CMAKE_CURRENT_SOURCE_DIR}/fpedit.icns"
  591. "${CMAKE_CURRENT_SOURCE_DIR}/fpedit_doc.icns"
  592. PROPERTIES MACOSX_PACKAGE_LOCATION Resources
  593. )
  594. set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
  595. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
  596. set( MACOSX_BUNDLE_NAME pcbnew )
  597. endif()
  598. add_subdirectory( pcb_io/pcad )
  599. add_subdirectory( pcb_io/altium )
  600. add_subdirectory( pcb_io/cadstar )
  601. add_subdirectory( pcb_io/easyeda )
  602. add_subdirectory( pcb_io/easyedapro )
  603. add_subdirectory( pcb_io/fabmaster )
  604. add_subdirectory( pcb_io/ipc2581 )
  605. add_subdirectory( pcb_io/odbpp )
  606. set( PCBNEW_IO_LIBRARIES pcad2kicadpcb altium2pcbnew cadstar2pcbnew easyeda easyedapro fabmaster ipc2581 odbpp CACHE INTERNAL "")
  607. # a very small program launcher for pcbnew_kiface
  608. add_executable( pcbnew WIN32 MACOSX_BUNDLE
  609. ${CMAKE_SOURCE_DIR}/common/single_top.cpp
  610. ${PCBNEW_RESOURCES}
  611. )
  612. set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp pcbnew.cpp PROPERTIES
  613. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB_EDITOR;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
  614. )
  615. target_link_libraries( pcbnew
  616. kicommon
  617. ${wxWidgets_LIBRARIES}
  618. )
  619. target_link_options( pcbnew PRIVATE
  620. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=pcbnew.map>
  621. )
  622. # the main pcbnew program, in DSO form.
  623. add_library( pcbnew_kiface_objects OBJECT
  624. pcbnew.cpp
  625. ${PCBNEW_SRCS}
  626. ${PCBNEW_COMMON_SRCS}
  627. ${PCBNEW_SCRIPTING_SRCS}
  628. )
  629. # auto-generate specctra_lexer.h and specctra_keywords.cpp
  630. make_lexer(
  631. pcbnew_kiface_objects
  632. specctra_import_export/specctra.keywords
  633. specctra_import_export/specctra_lexer.h
  634. specctra_import_export/specctra_keywords.cpp
  635. DSN
  636. )
  637. target_link_libraries( pcbnew_kiface_objects
  638. PRIVATE
  639. common
  640. core
  641. nlohmann_json
  642. rectpack2d
  643. gzip-hpp
  644. Boost::boost
  645. ZLIB::ZLIB
  646. ${OCC_LIBRARIES}
  647. )
  648. add_library( pcbnew_kiface MODULE )
  649. set_target_properties( pcbnew_kiface PROPERTIES
  650. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  651. # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
  652. OUTPUT_NAME pcbnew
  653. PREFIX ${KIFACE_PREFIX}
  654. SUFFIX ${KIFACE_SUFFIX}
  655. )
  656. if ( KICAD_BUILD_TESTS )
  657. if ( UNIX )
  658. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  659. COMMAND ln -sf _pcbnew.kiface lib_pcbnew_kiface.so )
  660. else()
  661. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  662. COMMAND copy _pcbnew.kiface lib_pcbnew_kiface.dll )
  663. endif()
  664. endif ()
  665. set( PCBNEW_KIFACE_LIBRARIES
  666. pcbnew_kiface_objects
  667. 3d-viewer
  668. connectivity
  669. pcbcommon
  670. pnsrouter
  671. kicommon
  672. kiplatform
  673. common
  674. gal
  675. scripting
  676. core
  677. idf3
  678. markdown_lib
  679. ${PCBNEW_IO_LIBRARIES}
  680. ${wxWidgets_LIBRARIES}
  681. ${PYTHON_LIBRARIES}
  682. Boost::headers
  683. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  684. )
  685. target_link_libraries( pcbnew_kiface
  686. PRIVATE
  687. ${PCBNEW_KIFACE_LIBRARIES}
  688. )
  689. set_source_files_properties( pcbnew.cpp PROPERTIES
  690. # The KIFACE is in pcbnew.cpp, export it:
  691. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  692. )
  693. target_link_options( pcbnew_kiface PRIVATE
  694. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=_pcbnew.kiface.map>
  695. )
  696. # if building pcbnew, then also build pcbnew_kiface if out of date.
  697. add_dependencies( pcbnew pcbnew_kiface )
  698. if( WIN32 )
  699. # Copy dynamic lib dependency to build dir to allow running directly
  700. add_custom_command( TARGET pcbnew POST_BUILD
  701. COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:kicad_3dsg>" "$<TARGET_FILE_DIR:pcbnew>"
  702. )
  703. add_custom_command( TARGET pcbnew POST_BUILD
  704. COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:kiapi>" "$<TARGET_FILE_DIR:pcbnew>"
  705. )
  706. endif()
  707. # these 2 binaries are a matched set, keep them together:
  708. if( APPLE )
  709. set_target_properties( pcbnew PROPERTIES
  710. MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcbnew/Info.plist
  711. )
  712. # puts binaries into the *.app bundle while linking
  713. set_target_properties( pcbnew_kiface PROPERTIES
  714. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  715. )
  716. set_target_properties( pcbnew PROPERTIES INSTALL_RPATH
  717. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  718. set_target_properties( pcbnew_kiface PROPERTIES INSTALL_RPATH
  719. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  720. set_target_properties( pcbnew_kiface PROPERTIES BUILD_WITH_INSTALL_RPATH 1 )
  721. # put individual bundle outside of main bundle as a first step
  722. # will be pulled into the main bundle when creating main bundle
  723. install( TARGETS pcbnew
  724. DESTINATION ${KICAD_BIN}
  725. COMPONENT binary
  726. )
  727. install( CODE "
  728. set( KICAD_CMAKE_MODULE_PATH \"${KICAD_CMAKE_MODULE_PATH}\" )
  729. set( KICAD_BIN \"${KICAD_BIN}\" )
  730. set( OSX_BUNDLE_INSTALL_BIN_DIR \"${OSX_BUNDLE_INSTALL_BIN_DIR}\" )
  731. set( OSX_BUNDLE_INSTALL_LIB_DIR \"${OSX_BUNDLE_INSTALL_LIB_DIR}\" )
  732. set( OSX_BUNDLE_BUILD_KIFACE_DIR \"${OSX_BUNDLE_BUILD_KIFACE_DIR}\" )
  733. " )
  734. install( CODE [[
  735. include( ${KICAD_CMAKE_MODULE_PATH}/InstallSteps/InstallMacOS.cmake )
  736. # Install any dependencies
  737. install_runtime_deps( "${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew"
  738. "${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface"
  739. ""
  740. )
  741. ]] )
  742. else()
  743. if( MSVC )
  744. target_sources( pcbnew_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/pcbnew-dll.rc )
  745. endif()
  746. install( TARGETS pcbnew
  747. DESTINATION ${KICAD_BIN}
  748. COMPONENT binary
  749. )
  750. install( TARGETS pcbnew_kiface
  751. DESTINATION ${KICAD_KIFACE}
  752. COMPONENT binary
  753. )
  754. endif()
  755. if( KICAD_WIN32_INSTALL_PDBS )
  756. # Get the PDBs to copy over for MSVC
  757. install(FILES $<TARGET_PDB_FILE:pcbnew> DESTINATION ${KICAD_BIN})
  758. install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_KIFACE})
  759. endif()
  760. if( NOT APPLE )
  761. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
  762. else()
  763. # put into bundle at build time, it is relocated at install
  764. add_custom_target( ScriptingPcbnewPyCopy ALL
  765. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
  766. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  767. COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
  768. )
  769. add_dependencies( ScriptingPcbnewPyCopy ScriptingPythonDirectoryCreation )
  770. endif()
  771. # python plugins
  772. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
  773. DESTINATION ${KICAD_DATA}/scripting/plugins
  774. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  775. )
  776. # Here is built the _pcbnew.{so,pyd} which is the native part of the pcbnew Python library
  777. # when Python is used from the command line.
  778. if( WIN32 )
  779. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
  780. set( PYMOD_EXT "pyd" )
  781. elseif( APPLE )
  782. # put everything into bundle at build time, it is relocated at install
  783. add_custom_target( ScriptingModulesPcbnewSoCopy ALL
  784. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
  785. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
  786. COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
  787. )
  788. add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation )
  789. set( PYMOD_EXT "so" )
  790. else()
  791. # Linux is the remaining platform, and all that has to be installed is the created symlink.
  792. set( PYMOD_EXT "so" )
  793. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/python/_pcbnew.${PYMOD_EXT} DESTINATION ${PYTHON_DEST} )
  794. endif()
  795. if( APPLE )
  796. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  797. DEPENDS pcbnew_kiface
  798. COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
  799. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  800. )
  801. set( PYTHON_FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT} )
  802. elseif( WIN32 )
  803. # For phase 1, copy _pcbnew.kiface to the python module.
  804. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  805. DEPENDS pcbnew_kiface
  806. COMMAND ${CMAKE_COMMAND} -E copy _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
  807. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  808. )
  809. set( PYTHON_FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT} )
  810. else()
  811. # For linux, just create a symlink in the build directory to ensure the unit tests can find the library
  812. # We don't actually do anything with this symlink though, since we create the proper one for the install
  813. # later.
  814. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  815. DEPENDS pcbnew_kiface
  816. COMMAND ${CMAKE_COMMAND} -E create_symlink _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
  817. COMMENT "Symlinking _pcbnew.${PYMOD_EXT} to _pcbnew${KIFACE_SUFFIX}."
  818. )
  819. if( IS_ABSOLUTE ${KICAD_KIFACE} )
  820. file( RELATIVE_PATH PCBNEW_PYTHON_SYMLINK ${PYTHON_FULL_DEST} ${KICAD_KIFACE}/_pcbnew${KIFACE_SUFFIX} )
  821. else()
  822. file( RELATIVE_PATH PCBNEW_PYTHON_SYMLINK ${PYTHON_FULL_DEST} ${CMAKE_INSTALL_PREFIX}/${KICAD_KIFACE}/_pcbnew${KIFACE_SUFFIX} )
  823. endif()
  824. file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python )
  825. # This is the symlink we use in the installation directory, so it will not resolve in the build directory.
  826. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python/_pcbnew.${PYMOD_EXT}
  827. DEPENDS pcbnew_kiface
  828. COMMAND ln -sf "${PCBNEW_PYTHON_SYMLINK}" "${CMAKE_CURRENT_BINARY_DIR}/python/_pcbnew.${PYMOD_EXT}"
  829. COMMENT "Creating install symlink from _pcbnew.${PYMOD_EXT} to _pcbnew${KIFACE_SUFFIX}."
  830. )
  831. set( PYTHON_FILES
  832. ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  833. ${CMAKE_CURRENT_BINARY_DIR}/python/_pcbnew.${PYMOD_EXT}
  834. )
  835. endif()
  836. add_custom_target(
  837. pcbnew_python_module ALL
  838. DEPENDS ${PYTHON_FILES}
  839. )
  840. if( APPLE )
  841. # If we don't have wxPython, then we must create the site-packages directory
  842. add_custom_target( ScriptingPythonDirectoryCreation ALL
  843. COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_DEST}"
  844. COMMENT "Creating Python library directory ${PYTHON_DEST}"
  845. )
  846. endif()