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.

865 lines
29 KiB

5 years 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
* 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. if( UNIX AND NOT APPLE )
  2. # Setting this ON slows down linking and is a advanced (=hidden) developer option for
  3. # linux, not a user option.
  4. option( PCBNEW_LINK_MAPS
  5. "Developer: create linker map files for pcbnew binaries, not typical for Debug builds"
  6. )
  7. mark_as_advanced( PCBNEW_LINK_MAPS )
  8. endif()
  9. add_definitions( -DPCBNEW )
  10. add_subdirectory(connectivity)
  11. add_subdirectory(router)
  12. # psnrouter depends on make_lexer outputs in common (bug #1285878 )
  13. add_dependencies( pnsrouter pcbcommon )
  14. file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swig )
  15. # Infrequently needed headers go at end of search paths, append to INC_AFTER
  16. set( INC_AFTER ${INC_AFTER} python/scripting )
  17. set( INC_AFTER ${INC_AFTER} ${CMAKE_SOURCE_DIR}/common/swig )
  18. include_directories( BEFORE ${INC_BEFORE} )
  19. include_directories(
  20. ./dialogs
  21. ./autorouter
  22. ${CMAKE_SOURCE_DIR}/3d-viewer
  23. ${CMAKE_SOURCE_DIR}/3d-viewer/dialogs
  24. ${CMAKE_SOURCE_DIR}/common
  25. ${CMAKE_SOURCE_DIR}/common/dialogs
  26. ./exporters
  27. ./importers
  28. ${CMAKE_SOURCE_DIR}/utils/idftools
  29. ./specctra_import_export
  30. ${INC_AFTER}
  31. )
  32. set( PCBNEW_DIALOGS
  33. teardrop/dialog_teardrop_base.cpp
  34. teardrop/dialog_teardrop.cpp
  35. dialogs/dialog_filter_selection.cpp
  36. dialogs/dialog_filter_selection_base.cpp
  37. dialogs/dialog_board_setup.cpp
  38. dialogs/dialog_board_statistics.cpp
  39. dialogs/dialog_board_statistics_base.cpp
  40. dialogs/dialog_board_reannotate.cpp
  41. dialogs/dialog_board_reannotate_base.cpp
  42. dialogs/dialog_choose_footprint.cpp
  43. dialogs/dialog_cleanup_graphics.cpp
  44. dialogs/dialog_cleanup_graphics_base.cpp
  45. dialogs/dialog_cleanup_tracks_and_vias.cpp
  46. dialogs/dialog_cleanup_tracks_and_vias_base.cpp
  47. dialogs/dialog_constraints_reporter.cpp
  48. dialogs/dialog_constraints_reporter_base.cpp
  49. dialogs/dialog_copper_zones.cpp
  50. dialogs/dialog_copper_zones_base.cpp
  51. dialogs/dialog_create_array.cpp
  52. dialogs/dialog_create_array_base.cpp
  53. dialogs/dialog_dimension_properties.cpp
  54. dialogs/dialog_dimension_properties_base.cpp
  55. dialogs/dialog_drc.cpp
  56. dialogs/dialog_drc_base.cpp
  57. dialogs/dialog_footprint_checker.cpp
  58. dialogs/dialog_footprint_checker_base.cpp
  59. dialogs/dialog_footprint_properties.cpp
  60. dialogs/dialog_footprint_properties_base.cpp
  61. dialogs/dialog_footprint_properties_fp_editor.cpp
  62. dialogs/dialog_footprint_properties_fp_editor_base.cpp
  63. dialogs/dialog_enum_pads.cpp
  64. dialogs/dialog_enum_pads_base.cpp
  65. dialogs/dialog_exchange_footprints.cpp
  66. dialogs/dialog_exchange_footprints_base.cpp
  67. dialogs/dialog_export_idf.cpp
  68. dialogs/dialog_export_idf_base.cpp
  69. dialogs/dialog_export_step.cpp
  70. dialogs/dialog_export_step_base.cpp
  71. dialogs/dialog_export_svg.cpp
  72. dialogs/dialog_export_svg_base.cpp
  73. dialogs/dialog_export_vrml.cpp
  74. dialogs/dialog_export_vrml_base.cpp
  75. dialogs/dialog_find.cpp
  76. dialogs/dialog_find_base.cpp
  77. dialogs/dialog_footprint_wizard_list.cpp
  78. dialogs/dialog_footprint_wizard_list_base.cpp
  79. dialogs/dialog_fp_plugin_options.cpp
  80. dialogs/dialog_fp_plugin_options_base.cpp
  81. dialogs/dialog_gen_footprint_position_file_base.cpp
  82. dialogs/dialog_gencad_export_options.cpp
  83. dialogs/dialog_gendrill.cpp
  84. dialogs/dialog_gendrill_base.cpp
  85. dialogs/dialog_get_footprint_by_name_base.cpp
  86. dialogs/dialog_global_deletion.cpp
  87. dialogs/dialog_global_deletion_base.cpp
  88. dialogs/dialog_global_edit_tracks_and_vias.cpp
  89. dialogs/dialog_global_edit_tracks_and_vias_base.cpp
  90. dialogs/dialog_global_edit_text_and_graphics.cpp
  91. dialogs/dialog_global_edit_text_and_graphics_base.cpp
  92. dialogs/dialog_global_fp_lib_table_config.cpp
  93. dialogs/dialog_group_properties.cpp
  94. dialogs/dialog_group_properties_base.cpp
  95. dialogs/dialog_push_pad_properties.cpp
  96. dialogs/dialog_push_pad_properties_base.cpp
  97. dialogs/dialog_graphic_item_properties.cpp
  98. dialogs/dialog_graphic_item_properties_base.cpp
  99. dialogs/dialog_import_settings.cpp
  100. dialogs/dialog_import_settings_base.cpp
  101. dialogs/dialog_imported_layers_base.cpp
  102. dialogs/dialog_imported_layers.cpp
  103. dialogs/dialog_rule_area_properties.cpp
  104. dialogs/dialog_rule_area_properties_base.cpp
  105. dialogs/dialog_layer_selection_base.cpp
  106. dialogs/dialog_move_exact.cpp
  107. dialogs/dialog_move_exact_base.cpp
  108. dialogs/dialog_net_inspector.cpp
  109. dialogs/dialog_net_inspector_base.cpp
  110. dialogs/dialog_netlist.cpp
  111. dialogs/dialog_netlist_base.cpp
  112. dialogs/dialog_non_copper_zones_properties.cpp
  113. dialogs/dialog_non_copper_zones_properties_base.cpp
  114. dialogs/dialog_pad_basicshapes_properties.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_length_tuning_settings.cpp
  122. dialogs/dialog_pns_length_tuning_settings_base.cpp
  123. dialogs/dialog_pns_settings.cpp
  124. dialogs/dialog_pns_settings_base.cpp
  125. dialogs/dialog_position_relative.cpp
  126. dialogs/dialog_position_relative_base.cpp
  127. dialogs/dialog_print_pcbnew.cpp
  128. dialogs/dialog_swap_layers.cpp
  129. dialogs/dialog_swap_layers_base.cpp
  130. dialogs/dialog_target_properties.cpp
  131. dialogs/dialog_target_properties_base.cpp
  132. dialogs/dialog_text_properties.cpp
  133. dialogs/dialog_text_properties_base.cpp
  134. dialogs/dialog_textbox_properties.cpp
  135. dialogs/dialog_textbox_properties_base.cpp
  136. dialogs/dialog_track_via_properties.cpp
  137. dialogs/dialog_track_via_properties_base.cpp
  138. dialogs/dialog_track_via_size.cpp
  139. dialogs/dialog_track_via_size_base.cpp
  140. dialogs/dialog_unused_pad_layers.cpp
  141. dialogs/dialog_unused_pad_layers_base.cpp
  142. dialogs/dialog_update_pcb.cpp
  143. dialogs/dialog_update_pcb_base.cpp
  144. dialogs/panel_display_options.cpp
  145. dialogs/panel_display_options_base.cpp
  146. dialogs/panel_edit_options.cpp
  147. dialogs/panel_edit_options_base.cpp
  148. dialogs/panel_fp_lib_table.cpp
  149. dialogs/panel_fp_lib_table_base.cpp
  150. dialogs/panel_fp_editor_color_settings.cpp
  151. dialogs/panel_fp_editor_defaults.cpp
  152. dialogs/panel_fp_editor_defaults_base.cpp
  153. dialogs/panel_fp_properties_3d_model.cpp
  154. dialogs/panel_fp_properties_3d_model_base.cpp
  155. dialogs/panel_pcbnew_action_plugins.cpp
  156. dialogs/panel_pcbnew_action_plugins_base.cpp
  157. dialogs/panel_pcbnew_color_settings.cpp
  158. dialogs/panel_pcbnew_display_origin.cpp
  159. dialogs/panel_pcbnew_display_origin_base.cpp
  160. dialogs/panel_setup_constraints.cpp
  161. dialogs/panel_setup_constraints_base.cpp
  162. dialogs/panel_setup_formatting.cpp
  163. dialogs/panel_setup_formatting_base.cpp
  164. dialogs/panel_setup_mask_and_paste.cpp
  165. dialogs/panel_setup_mask_and_paste_base.cpp
  166. dialogs/panel_setup_layers.cpp
  167. dialogs/panel_setup_layers_base.cpp
  168. dialogs/panel_setup_rules.cpp
  169. dialogs/panel_setup_rules_base.cpp
  170. dialogs/panel_setup_text_and_graphics.cpp
  171. dialogs/panel_setup_text_and_graphics_base.cpp
  172. dialogs/panel_setup_tracks_and_vias.cpp
  173. dialogs/panel_setup_tracks_and_vias_base.cpp
  174. footprint_wizard.cpp
  175. footprint_wizard_frame.cpp
  176. footprint_wizard_frame_functions.cpp
  177. )
  178. set( PCBNEW_BRDSTACKUP_MGR
  179. board_stackup_manager/dielectric_material.cpp
  180. board_stackup_manager/stackup_predefined_prms.cpp
  181. board_stackup_manager/panel_board_finish.cpp
  182. board_stackup_manager/panel_board_finish_base.cpp
  183. board_stackup_manager/panel_board_stackup.cpp
  184. board_stackup_manager/panel_board_stackup_base.cpp
  185. board_stackup_manager/board_stackup_reporter.cpp
  186. board_stackup_manager/dialog_dielectric_list_manager_base.cpp
  187. board_stackup_manager/dialog_dielectric_list_manager.cpp
  188. )
  189. set( PCBNEW_IMPORT_GFX
  190. import_gfx/dialog_import_gfx_base.cpp
  191. import_gfx/dialog_import_gfx.cpp
  192. import_gfx/graphics_import_mgr.cpp
  193. import_gfx/graphics_importer.cpp
  194. import_gfx/graphics_importer_pcbnew.cpp
  195. import_gfx/graphics_importer_buffer.cpp
  196. import_gfx/dxf_import_plugin.cpp
  197. import_gfx/svg_import_plugin.cpp
  198. )
  199. set( PCBNEW_EXPORTERS
  200. exporters/export_hyperlynx.cpp
  201. exporters/export_d356.cpp
  202. exporters/export_footprint_associations.cpp
  203. exporters/export_gencad.cpp
  204. exporters/export_idf.cpp
  205. exporters/export_vrml.cpp
  206. exporters/export_footprints_placefile.cpp
  207. exporters/gen_drill_report_files.cpp
  208. exporters/gen_footprints_placefile.cpp
  209. exporters/gendrill_Excellon_writer.cpp
  210. exporters/gendrill_file_writer_base.cpp
  211. exporters/gendrill_gerber_writer.cpp
  212. exporters/gerber_jobfile_writer.cpp
  213. exporters/gerber_placefile_writer.cpp
  214. )
  215. set( PCBNEW_MICROWAVE_SRCS
  216. microwave/microwave_footprint.cpp
  217. microwave/microwave_inductor.cpp
  218. microwave/microwave_polygon.cpp
  219. microwave/microwave_tool.cpp
  220. )
  221. set( PCBNEW_DRC_SRCS
  222. drc/drc_test_provider.cpp
  223. drc/drc_test_provider_annular_width.cpp
  224. drc/drc_test_provider_disallow.cpp
  225. drc/drc_test_provider_connectivity.cpp
  226. drc/drc_test_provider_copper_clearance.cpp
  227. drc/drc_test_provider_mechanical_clearance.cpp
  228. drc/drc_test_provider_courtyard_clearance.cpp
  229. drc/drc_test_provider_edge_clearance.cpp
  230. drc/drc_test_provider_footprint_checks.cpp
  231. drc/drc_test_provider_hole_to_hole.cpp
  232. drc/drc_test_provider_hole_size.cpp
  233. drc/drc_test_provider_library_parity.cpp
  234. drc/drc_test_provider_schematic_parity.cpp
  235. drc/drc_test_provider_misc.cpp
  236. drc/drc_test_provider_text_dims.cpp
  237. drc/drc_test_provider_track_width.cpp
  238. drc/drc_test_provider_zone_connections.cpp
  239. drc/drc_test_provider_via_diameter.cpp
  240. drc/drc_test_provider_solder_mask.cpp
  241. drc/drc_test_provider_silk_clearance.cpp
  242. drc/drc_test_provider_matched_length.cpp
  243. drc/drc_test_provider_diff_pair_coupling.cpp
  244. drc/drc_test_provider_sliver_checker.cpp
  245. )
  246. set( PCBNEW_NETLIST_SRCS
  247. netlist_reader/board_netlist_updater.cpp
  248. netlist_reader/netlist.cpp
  249. )
  250. set( PCBNEW_CLASS_SRCS
  251. ${PCBNEW_DIALOGS}
  252. ${PCBNEW_EXPORTERS}
  253. ${PCBNEW_DRC_SRCS}
  254. ${PCBNEW_IMPORT_GFX}
  255. ${PCBNEW_NETLIST_SRCS}
  256. ${PCBNEW_BRDSTACKUP_MGR}
  257. autorouter/rect_placement/rect_placement.cpp
  258. autorouter/spread_footprints.cpp
  259. autorouter/ar_autoplacer.cpp
  260. autorouter/ar_matrix.cpp
  261. autorouter/autoplace_tool.cpp
  262. action_plugin.cpp
  263. array_creator.cpp
  264. array_pad_number_provider.cpp
  265. build_BOM_from_board.cpp
  266. cleanup_item.cpp
  267. convert_shape_list_to_polygon.cpp
  268. cross-probing.cpp
  269. edit.cpp
  270. edit_track_width.cpp
  271. files.cpp
  272. footprint_info_impl.cpp
  273. footprint_wizard.cpp
  274. footprint_editor_utils.cpp
  275. footprint_editor_settings.cpp
  276. fp_tree_synchronizing_adapter.cpp
  277. footprint_edit_frame.cpp
  278. footprint_libraries_utils.cpp
  279. footprint_viewer_frame.cpp
  280. fp_tree_model_adapter.cpp
  281. generate_footprint_info.cpp
  282. graphics_cleaner.cpp
  283. grid_layer_box_helpers.cpp
  284. grid_layer_box_helpers.h
  285. initpcb.cpp
  286. load_select_footprint.cpp
  287. menubar_footprint_editor.cpp
  288. menubar_pcb_editor.cpp
  289. pcb_base_edit_frame.cpp
  290. pcb_layer_box_selector.cpp
  291. pcb_edit_frame.cpp
  292. pcbnew_config.cpp
  293. pcbnew_printout.cpp
  294. pcbnew_settings.cpp
  295. pcbplot.cpp
  296. plot_board_layers.cpp
  297. plot_brditems_plotter.cpp
  298. specctra_import_export/specctra.cpp
  299. specctra_import_export/specctra_export.cpp
  300. specctra_import_export/specctra_import.cpp
  301. fp_text_grid_table.cpp
  302. toolbars_footprint_editor.cpp
  303. toolbars_footprint_viewer.cpp
  304. toolbars_pcb_editor.cpp
  305. tracks_cleaner.cpp
  306. undo_redo.cpp
  307. zone_filler.cpp
  308. zones_functions_for_undo_redo.cpp
  309. edit_zone_helpers.cpp
  310. ratsnest/ratsnest.cpp
  311. tools/board_editor_control.cpp
  312. tools/board_inspection_tool.cpp
  313. tools/board_reannotate_tool.cpp
  314. tools/convert_tool.cpp
  315. tools/drawing_tool.cpp
  316. tools/drawing_stackup_table_tool.cpp
  317. tools/drc_tool.cpp
  318. tools/edit_tool.cpp
  319. tools/global_edit_tool.cpp
  320. tools/group_tool.cpp
  321. tools/footprint_editor_control.cpp
  322. tools/pad_tool.cpp
  323. tools/pcb_control.cpp
  324. tools/pcb_picker_tool.cpp
  325. tools/pcb_selection.cpp
  326. tools/pcb_selection_conditions.cpp
  327. tools/pcb_selection_tool.cpp
  328. tools/pcb_tool_base.cpp
  329. tools/placement_tool.cpp
  330. tools/pcb_point_editor.cpp
  331. tools/position_relative_tool.cpp
  332. tools/tool_event_utils.cpp
  333. tools/zone_create_helper.cpp
  334. tools/zone_filler_tool.cpp
  335. teardrop/teardrop.cpp
  336. teardrop/teardrop_utils.cpp
  337. footprint_preview_panel.cpp
  338. footprint_tree_pane.cpp
  339. widgets/appearance_controls.cpp
  340. widgets/appearance_controls_base.cpp
  341. widgets/panel_selection_filter.cpp
  342. widgets/panel_selection_filter_base.cpp
  343. )
  344. set( PCBNEW_SRCS
  345. ${PCBNEW_MICROWAVE_SRCS}
  346. ${PCBNEW_CLASS_SRCS}
  347. ${PCBNEW_DIALOGS}
  348. )
  349. # extra sources from common
  350. set( PCBNEW_COMMON_SRCS
  351. ${CMAKE_SOURCE_DIR}/common/base_units.cpp
  352. )
  353. set( PCBNEW_SCRIPTING_PYTHON_HELPERS
  354. ${CMAKE_SOURCE_DIR}/common/swig/wx_python_helpers.cpp
  355. python/scripting/pcbnew_action_plugins.cpp
  356. python/scripting/pcbnew_footprint_wizards.cpp
  357. python/scripting/pcbnew_scripting_helpers.cpp
  358. python/scripting/pcbnew_scripting.cpp
  359. python/scripting/pcb_scripting_tool.cpp
  360. )
  361. if( COMPILER_SUPPORTS_WARNINGS )
  362. # Only compile our source files with the warnings, since the SWIG generated
  363. # files contain a lot of warnings, we just ignore it.
  364. set_source_files_properties(
  365. ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  366. PROPERTIES COMPILE_FLAGS ${WARN_FLAGS_CXX}
  367. )
  368. endif()
  369. # Disable all warnings for the SWIG file
  370. if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
  371. if( MSYS )
  372. # For some reason the .cxx file generated by SWIG cannot be linked if compiled with debug options:
  373. # it creates a *lot* of not found symbols. So compile it with release mode
  374. set_source_files_properties( pcbnew_wrap.cxx PROPERTIES COMPILE_FLAGS "-O2 -w" )
  375. else()
  376. set_source_files_properties( pcbnew_wrap.cxx PROPERTIES COMPILE_FLAGS "-w" )
  377. endif()
  378. endif()
  379. set( PCBNEW_SCRIPTING_SRCS
  380. pcbnew_wrap.cxx
  381. ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  382. )
  383. set( SWIG_FLAGS
  384. -I${CMAKE_CURRENT_SOURCE_DIR}
  385. -I${CMAKE_SOURCE_DIR}/include
  386. -I${CMAKE_SOURCE_DIR}/scripting
  387. -I${CMAKE_SOURCE_DIR}/pcbnew/python/scripting
  388. -I${CMAKE_SOURCE_DIR}/common/swig
  389. -I${CMAKE_SOURCE_DIR}/libs/kimath/include
  390. -I${CMAKE_BINARY_DIR}
  391. )
  392. if( DEBUG )
  393. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  394. endif()
  395. # collect CFLAGS , and pass them to swig later
  396. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  397. foreach( d ${DirDefs} )
  398. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  399. endforeach()
  400. # We deliberately do not use the CMake support for swig here,
  401. # i.e. swig_add_footprint()) because we want full control.
  402. # Avoid threading in SWIG (breaks threads in pcbnew)
  403. set( SWIG_OPTS -python -c++ -nothreads )
  404. # Use python3-specific features
  405. set( SWIG_OPTS ${SWIG_OPTS} -py3 )
  406. set( SWIG_OPTS ${SWIG_OPTS} -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
  407. if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
  408. set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
  409. set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
  410. endif()
  411. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
  412. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  413. DEPENDS pcbcommon
  414. DEPENDS plotcontroller.h
  415. DEPENDS exporters/gendrill_Excellon_writer.h
  416. DEPENDS exporters/export_vrml.h
  417. DEPENDS python/swig/pcb_item_containers.i
  418. DEPENDS python/swig/pcbnew.i
  419. DEPENDS python/swig/board.i
  420. DEPENDS python/swig/board_connected_item.i
  421. DEPENDS python/swig/board_design_settings.i
  422. DEPENDS python/swig/board_item.i
  423. DEPENDS python/swig/board_item_container.i
  424. DEPENDS python/swig/connectivity.i
  425. DEPENDS python/swig/pcb_dimension.i
  426. DEPENDS python/swig/pcb_shape.i
  427. DEPENDS python/swig/fp_shape.i
  428. DEPENDS python/swig/pcb_marker.i
  429. DEPENDS python/swig/pcb_target.i
  430. DEPENDS python/swig/pcb_plot_params.i
  431. DEPENDS python/swig/footprint.i
  432. DEPENDS python/swig/netinfo.i
  433. DEPENDS python/swig/pad.i
  434. DEPENDS python/swig/pcb_group.i
  435. DEPENDS python/swig/pcb_text.i
  436. DEPENDS python/swig/pcb_group.i
  437. DEPENDS python/swig/plugins.i
  438. DEPENDS python/swig/fp_text.i
  439. DEPENDS python/swig/track.i
  440. DEPENDS python/swig/units.i
  441. DEPENDS python/swig/typeinfo.i
  442. DEPENDS python/swig/version.i
  443. DEPENDS python/swig/zone.i
  444. DEPENDS python/swig/zone_settings.i
  445. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/kicad.i
  446. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/wx.i
  447. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/math.i
  448. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/shape.i
  449. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/ki_exception.i
  450. DEPENDS ${CMAKE_SOURCE_DIR}/common/swig/netclass.i
  451. DEPENDS ${CMAKE_SOURCE_DIR}/scripting/kicadplugins.i
  452. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
  453. # Make docstrings.i available if it doesn't exist
  454. COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i
  455. COMMAND ${SWIG_EXECUTABLE}
  456. ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx ${CMAKE_SOURCE_DIR}/pcbnew/python/swig/pcbnew.i
  457. COMMAND ${PYTHON_EXECUTABLE}
  458. ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py
  459. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  460. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  461. )
  462. if( UNIX AND NOT APPLE )
  463. list( APPEND PCBNEW_EXTRA_LIBS rt )
  464. endif()
  465. ###
  466. # Doxygen python documentation
  467. ###
  468. if( DOXYGEN_FOUND )
  469. # create XML files from doxygen parsing
  470. add_custom_target( doxygen-python-xml
  471. ${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
  472. COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
  473. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  474. DEPENDS Doxyfile_xml
  475. COMMENT "building doxygen docs into directory doxygen-python/html"
  476. )
  477. # create .i files from XML doxygen parsing, docstrings.i will include all of them
  478. add_custom_target( xml-to-docstrings
  479. COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
  480. COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
  481. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
  482. COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
  483. COMMENT "building docstring files"
  484. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  485. DEPENDS pcbnew.py
  486. DEPENDS doxygen-python-xml
  487. )
  488. # The sources to give to the Python Doxygen target
  489. set( DOXYGEN_PYTHON_SOURCES
  490. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  491. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/FootprintWizardBase.py
  492. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/PadArray.py )
  493. # The Doxyfile expects a space-separated list in the env var
  494. string(REPLACE ";" " " DOXYGEN_PYTHON_SOURCES_STR "${DOXYGEN_PYTHON_SOURCES}")
  495. # Create doxygen-python html
  496. add_custom_target( doxygen-python
  497. ${CMAKE_COMMAND} -E remove_directory doxygen-python
  498. COMMAND ${CMAKE_COMMAND} -E env
  499. PYTHON_SOURCES_TO_DOC=${DOXYGEN_PYTHON_SOURCES_STR}
  500. CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
  501. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
  502. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  503. DEPENDS Doxyfile_python
  504. DEPENDS xml-to-docstrings
  505. DEPENDS ${DOXYGEN_PYTHON_SOURCES}
  506. COMMENT "building doxygen docs into directory doxygen-python/html"
  507. )
  508. endif()
  509. if( WIN32 )
  510. if( MINGW )
  511. # PCBNEW_RESOURCES variable is set by the macro.
  512. mingw_resource_compiler( pcbnew )
  513. else()
  514. set( PCBNEW_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/pcbnew.rc )
  515. endif()
  516. endif()
  517. # Create a C++ compilable string initializer containing markdown text into a *.h file:
  518. add_custom_command(
  519. OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_md.h
  520. COMMAND ${CMAKE_COMMAND}
  521. -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help.md
  522. -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_md.h
  523. -P ${CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  524. DEPENDS ${CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help.md
  525. COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_md.h
  526. from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help.md"
  527. )
  528. set_source_files_properties( dialogs/panel_setup_rules.cpp
  529. PROPERTIES
  530. OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_md.h
  531. )
  532. if( APPLE )
  533. # setup bundle
  534. set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
  535. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
  536. MACOSX_PACKAGE_LOCATION Resources
  537. )
  538. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
  539. MACOSX_PACKAGE_LOCATION Resources
  540. )
  541. set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
  542. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
  543. set( MACOSX_BUNDLE_NAME pcbnew )
  544. endif()
  545. add_subdirectory( plugins/pcad )
  546. add_subdirectory( plugins/altium )
  547. add_subdirectory( plugins/cadstar )
  548. add_subdirectory( plugins/fabmaster )
  549. set( PCBNEW_IO_LIBRARIES pcad2kicadpcb altium2pcbnew cadstar2pcbnew fabmaster CACHE INTERNAL "")
  550. # a very small program launcher for pcbnew_kiface
  551. add_executable( pcbnew WIN32 MACOSX_BUNDLE
  552. ${CMAKE_SOURCE_DIR}/common/single_top.cpp
  553. ${PCBNEW_RESOURCES}
  554. )
  555. set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp pcbnew.cpp PROPERTIES
  556. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB_EDITOR;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
  557. )
  558. target_link_libraries( pcbnew
  559. #singletop # replaces common, giving us restrictive control and link warnings.
  560. # There's way too much crap coming in from common yet.
  561. common
  562. gal
  563. scripting
  564. nlohmann_json
  565. ${wxWidgets_LIBRARIES}
  566. )
  567. if( PCBNEW_LINK_MAPS )
  568. set_target_properties( pcbnew PROPERTIES
  569. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map" )
  570. endif()
  571. # the main pcbnew program, in DSO form.
  572. add_library( pcbnew_kiface_objects OBJECT
  573. pcbnew.cpp
  574. ${PCBNEW_SRCS}
  575. ${PCBNEW_COMMON_SRCS}
  576. ${PCBNEW_SCRIPTING_SRCS}
  577. )
  578. # auto-generate specctra_lexer.h and specctra_keywords.cpp
  579. make_lexer(
  580. pcbnew_kiface_objects
  581. specctra_import_export/specctra.keywords
  582. specctra_import_export/specctra_lexer.h
  583. specctra_import_export/specctra_keywords.cpp
  584. DSN
  585. )
  586. # CMake <3.9 can't link anything to object libraries,
  587. # but we only need include directories, as we will link the kiface MODULE
  588. target_link_libraries( pcbnew_kiface_objects
  589. PRIVATE
  590. common
  591. dxflib_qcad
  592. nanosvg
  593. tinyspline_lib
  594. nlohmann_json
  595. )
  596. if( KICAD_STEP_EXPORT_LIB )
  597. add_definitions( -DKICAD_STEP_EXPORT_LIB )
  598. endif()
  599. add_library( pcbnew_kiface MODULE )
  600. set_target_properties( pcbnew_kiface PROPERTIES
  601. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  602. # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
  603. OUTPUT_NAME pcbnew
  604. PREFIX ${KIFACE_PREFIX}
  605. SUFFIX ${KIFACE_SUFFIX}
  606. )
  607. if ( KICAD_BUILD_TESTS )
  608. if ( UNIX )
  609. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  610. COMMAND ln -sf _pcbnew.kiface lib_pcbnew_kiface.so )
  611. else()
  612. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  613. COMMAND copy _pcbnew.kiface lib_pcbnew_kiface.dll )
  614. endif()
  615. endif ()
  616. set( PCBNEW_KIFACE_LIBRARIES
  617. pcbnew_kiface_objects
  618. 3d-viewer
  619. connectivity
  620. pcbcommon
  621. pnsrouter
  622. kiplatform
  623. common
  624. gal
  625. scripting
  626. dxflib_qcad
  627. tinyspline_lib
  628. idf3
  629. nanosvg
  630. markdown_lib
  631. ${PCBNEW_IO_LIBRARIES}
  632. ${wxWidgets_LIBRARIES}
  633. ${GDI_PLUS_LIBRARIES}
  634. ${PYTHON_LIBRARIES}
  635. ${Boost_LIBRARIES}
  636. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  637. )
  638. target_link_libraries( pcbnew_kiface
  639. PRIVATE
  640. ${PCBNEW_KIFACE_LIBRARIES}
  641. )
  642. set_source_files_properties( pcbnew.cpp PROPERTIES
  643. # The KIFACE is in pcbnew.cpp, export it:
  644. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  645. )
  646. if( PCBNEW_LINK_MAPS )
  647. set_target_properties( pcbnew_kiface PROPERTIES
  648. LINK_FLAGS "-Wl,-cref,-Map=_pcbnew.kiface.map"
  649. )
  650. set_target_properties( pcbnew PROPERTIES
  651. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map"
  652. )
  653. endif()
  654. # if building pcbnew, then also build pcbnew_kiface if out of date.
  655. add_dependencies( pcbnew pcbnew_kiface )
  656. if( WIN32 )
  657. # Copy dynamic lib dependency to build dir to allow running directly
  658. add_custom_command( TARGET pcbnew POST_BUILD
  659. COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:kicad_3dsg>" "$<TARGET_FILE_DIR:pcbnew>"
  660. )
  661. endif()
  662. # these 2 binaries are a matched set, keep them together:
  663. if( APPLE )
  664. set_target_properties( pcbnew PROPERTIES
  665. MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcbnew/Info.plist
  666. )
  667. # puts binaries into the *.app bundle while linking
  668. set_target_properties( pcbnew_kiface PROPERTIES
  669. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  670. )
  671. # put individual bundle outside of main bundle as a first step
  672. # will be pulled into the main bundle when creating main bundle
  673. install( TARGETS pcbnew
  674. DESTINATION ${KICAD_BIN}
  675. COMPONENT binary
  676. )
  677. install( CODE "
  678. # override default embedded path settings
  679. ${OSX_BUNDLE_OVERRIDE_PATHS}
  680. # do all the work
  681. include( BundleUtilities )
  682. fixup_bundle( ${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew
  683. \"\"
  684. \"\"
  685. )
  686. " COMPONENT Runtime
  687. )
  688. else()
  689. if( MSVC )
  690. target_sources( pcbnew_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/pcbnew-dll.rc )
  691. endif()
  692. install( TARGETS pcbnew
  693. DESTINATION ${KICAD_BIN}
  694. COMPONENT binary
  695. )
  696. install( TARGETS pcbnew_kiface
  697. DESTINATION ${KICAD_BIN}
  698. COMPONENT binary
  699. )
  700. endif()
  701. if( KICAD_WIN32_INSTALL_PDBS )
  702. # Get the PDBs to copy over for MSVC
  703. install(FILES $<TARGET_PDB_FILE:pcbnew> DESTINATION ${KICAD_BIN})
  704. install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_BIN})
  705. endif()
  706. if( NOT APPLE )
  707. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
  708. else()
  709. # put into bundle at build time, it is relocated at install
  710. add_custom_target( ScriptingPcbnewPyCopy ALL
  711. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
  712. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  713. COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
  714. )
  715. add_dependencies( ScriptingPcbnewPyCopy ScriptingPythonDirectoryCreation )
  716. endif()
  717. # python plugins
  718. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
  719. DESTINATION ${KICAD_DATA}/scripting/plugins
  720. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  721. )
  722. # Here is built the _pcbnew.{so,pyd} which is the native part of the pcbnew Python library
  723. # when Python is used from the command line.
  724. if( WIN32 )
  725. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
  726. set( PYMOD_EXT "pyd" )
  727. elseif( APPLE )
  728. # put everything into bundle at build time, it is relocated at install
  729. add_custom_target( ScriptingModulesPcbnewSoCopy ALL
  730. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
  731. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
  732. COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
  733. )
  734. add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation )
  735. set( PYMOD_EXT "so" )
  736. else() # only linux remains among supported platforms
  737. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.kiface DESTINATION ${PYTHON_DEST} COMPONENT binary RENAME "_pcbnew.so" )
  738. set( PYMOD_EXT "so" )
  739. endif()
  740. if( APPLE )
  741. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  742. DEPENDS pcbnew_kiface
  743. COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
  744. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  745. )
  746. add_custom_target(
  747. pcbnew_python_module ALL
  748. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  749. )
  750. else()
  751. # For phase 1, copy _pcbnew.kiface to the python module.
  752. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  753. DEPENDS pcbnew_kiface
  754. COMMAND ${CMAKE_COMMAND} -E copy _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
  755. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  756. )
  757. add_custom_target(
  758. pcbnew_python_module ALL
  759. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  760. )
  761. endif()
  762. if( APPLE )
  763. # If we don't have wxPython, then we must create the site-packages directory
  764. add_custom_target( ScriptingPythonDirectoryCreation ALL
  765. COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_DEST}"
  766. COMMENT "Creating Python library directory ${PYTHON_DEST}"
  767. )
  768. endif()