2013-08-20 18:03:21 +00:00
|
|
|
add_definitions( -DPCBNEW )
|
2016-02-29 19:08:03 +00:00
|
|
|
|
2013-09-10 17:26:44 +00:00
|
|
|
add_subdirectory(router)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2014-02-27 22:56:16 +00:00
|
|
|
# psnrouter depends on make_lexer outputs in common (bug # 1285878 )
|
|
|
|
add_dependencies( pnsrouter pcbcommon )
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
2016-09-27 14:50:22 +00:00
|
|
|
file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swig )
|
2016-06-10 18:08:35 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
# Infrequently needed headers go at end of search paths, append to INC_AFTER
|
2016-09-20 15:59:43 +00:00
|
|
|
set( INC_AFTER ${INC_AFTER} swig )
|
|
|
|
set( INC_AFTER ${INC_AFTER} ../common/swig )
|
2013-08-20 18:03:21 +00:00
|
|
|
|
|
|
|
#message( STATUS "pcbnew INC_AFTER:${INC_AFTER}" )
|
|
|
|
endif()
|
2012-07-22 12:15:38 +00:00
|
|
|
|
2012-02-28 21:30:46 +00:00
|
|
|
|
2015-08-20 07:14:44 +00:00
|
|
|
if( BUILD_GITHUB_PLUGIN )
|
|
|
|
set( GITHUB_3DLIBRARIES_WIZARD
|
|
|
|
dialogs/wizard_3DShape_Libs_downloader_base.cpp
|
|
|
|
dialogs/wizard_3DShape_Libs_downloader.cpp )
|
|
|
|
endif()
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
include_directories( BEFORE ${INC_BEFORE} )
|
2012-01-23 04:33:36 +00:00
|
|
|
include_directories(
|
|
|
|
./dialogs
|
2012-06-05 19:07:33 +00:00
|
|
|
./autorouter
|
2012-01-23 04:33:36 +00:00
|
|
|
../3d-viewer
|
|
|
|
../common
|
|
|
|
../polygon
|
|
|
|
../common/dialogs
|
2014-01-07 20:41:32 +00:00
|
|
|
./exporters
|
2013-10-24 16:44:38 +00:00
|
|
|
../lib_dxf
|
|
|
|
./import_dxf
|
2014-06-05 18:37:04 +00:00
|
|
|
../utils/idftools
|
2015-12-10 19:20:35 +00:00
|
|
|
${GLM_INCLUDE_DIR}
|
2012-01-23 04:33:36 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_DIALOGS
|
2010-11-12 18:38:48 +00:00
|
|
|
dialogs/dialog_block_options_base.cpp
|
2010-11-21 18:28:32 +00:00
|
|
|
dialogs/dialog_cleaning_options_base.cpp
|
|
|
|
dialogs/dialog_cleaning_options.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_copper_zones.cpp
|
|
|
|
dialogs/dialog_copper_zones_base.cpp
|
2015-02-12 03:22:24 +00:00
|
|
|
dialogs/dialog_create_array.cpp
|
|
|
|
dialogs/dialog_create_array_base.cpp
|
2010-11-26 20:00:39 +00:00
|
|
|
dialogs/dialog_design_rules.cpp
|
|
|
|
dialogs/dialog_design_rules_base.cpp
|
2011-11-24 19:57:41 +00:00
|
|
|
dialogs/dialog_dimension_editor_base.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_display_options.cpp
|
|
|
|
dialogs/dialog_display_options_base.cpp
|
2010-11-26 17:47:35 +00:00
|
|
|
dialogs/dialog_drc_base.cpp
|
|
|
|
dialogs/dialog_drc.cpp
|
2010-11-26 11:55:34 +00:00
|
|
|
dialogs/dialog_edit_module_for_BoardEditor.cpp
|
|
|
|
dialogs/dialog_edit_module_for_BoardEditor_base.cpp
|
|
|
|
dialogs/dialog_edit_module_for_Modedit_base.cpp
|
|
|
|
dialogs/dialog_edit_module_for_Modedit.cpp
|
|
|
|
dialogs/dialog_edit_module_text.cpp
|
|
|
|
dialogs/dialog_edit_module_text_base.cpp
|
2014-07-09 13:10:32 +00:00
|
|
|
dialogs/dialog_enum_pads.cpp
|
|
|
|
dialogs/dialog_enum_pads_base.cpp
|
2010-11-26 11:55:34 +00:00
|
|
|
dialogs/dialog_exchange_modules_base.cpp
|
2014-01-02 09:26:03 +00:00
|
|
|
dialogs/dialog_export_idf.cpp
|
|
|
|
dialogs/dialog_export_idf_base.cpp
|
2013-01-13 16:55:07 +00:00
|
|
|
dialogs/dialog_export_vrml_base.cpp
|
|
|
|
dialogs/dialog_export_vrml.cpp
|
2016-09-19 07:40:36 +00:00
|
|
|
dialogs/dialog_export_step_base.cpp
|
|
|
|
dialogs/dialog_export_step.cpp
|
2012-05-28 20:01:51 +00:00
|
|
|
dialogs/dialog_find_base.cpp
|
|
|
|
dialogs/dialog_find.cpp
|
2012-10-15 22:30:01 +00:00
|
|
|
dialogs/dialog_fp_lib_table_base.cpp
|
|
|
|
dialogs/dialog_fp_lib_table.cpp
|
2013-10-13 21:33:58 +00:00
|
|
|
dialogs/dialog_fp_plugin_options_base.cpp
|
|
|
|
dialogs/dialog_fp_plugin_options.cpp
|
2010-11-29 15:05:01 +00:00
|
|
|
dialogs/dialog_freeroute_exchange.cpp
|
|
|
|
dialogs/dialog_freeroute_exchange_base.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
dialogs/dialog_gendrill.cpp
|
|
|
|
dialogs/dialog_gendrill_base.cpp
|
2012-02-15 10:41:16 +00:00
|
|
|
dialogs/dialog_gen_module_position_file_base.cpp
|
2010-11-26 17:47:35 +00:00
|
|
|
dialogs/dialog_general_options.cpp
|
|
|
|
dialogs/dialog_general_options_BoardEditor_base.cpp
|
2015-12-20 18:47:52 +00:00
|
|
|
dialogs/dialog_get_footprint_by_name_base.cpp
|
2010-11-26 17:47:35 +00:00
|
|
|
dialogs/dialog_global_edit_tracks_and_vias.cpp
|
|
|
|
dialogs/dialog_global_edit_tracks_and_vias_base.cpp
|
2012-05-29 12:25:10 +00:00
|
|
|
dialogs/dialog_global_modules_fields_edition.cpp
|
|
|
|
dialogs/dialog_global_modules_fields_edition_base.cpp
|
2010-11-26 17:47:35 +00:00
|
|
|
dialogs/dialog_global_pads_edition_base.cpp
|
2010-11-26 11:55:34 +00:00
|
|
|
dialogs/dialog_graphic_items_options.cpp
|
|
|
|
dialogs/dialog_graphic_items_options_base.cpp
|
|
|
|
dialogs/dialog_graphic_item_properties.cpp
|
|
|
|
dialogs/dialog_graphic_item_properties_base.cpp
|
2012-02-12 19:39:37 +00:00
|
|
|
dialogs/dialog_graphic_item_properties_for_Modedit.cpp
|
2010-11-26 20:00:39 +00:00
|
|
|
dialogs/dialog_global_deletion.cpp
|
|
|
|
dialogs/dialog_global_deletion_base.cpp
|
2012-07-13 18:55:29 +00:00
|
|
|
dialogs/dialog_keepout_area_properties.cpp
|
|
|
|
dialogs/dialog_keepout_area_properties_base.cpp
|
2013-08-30 19:28:31 +00:00
|
|
|
dialogs/dialog_layer_selection_base.cpp
|
2010-11-26 20:00:39 +00:00
|
|
|
dialogs/dialog_layers_setup.cpp
|
|
|
|
dialogs/dialog_layers_setup_base.cpp
|
2015-01-30 18:42:46 +00:00
|
|
|
dialogs/dialog_modedit_options.cpp
|
|
|
|
dialogs/dialog_modedit_options_base.cpp
|
2010-11-26 17:47:35 +00:00
|
|
|
dialogs/dialog_netlist.cpp
|
|
|
|
dialogs/dialog_netlist_fbp.cpp
|
|
|
|
dialogs/dialog_pcb_text_properties.cpp
|
2010-11-27 13:09:18 +00:00
|
|
|
dialogs/dialog_pcb_text_properties_base.cpp
|
2014-05-14 14:28:39 +00:00
|
|
|
dialogs/dialog_pns_settings.cpp
|
|
|
|
dialogs/dialog_pns_settings_base.cpp
|
2015-02-12 03:22:24 +00:00
|
|
|
dialogs/dialog_move_exact.cpp
|
|
|
|
dialogs/dialog_move_exact_base.cpp
|
2015-02-18 00:29:54 +00:00
|
|
|
dialogs/dialog_pns_diff_pair_dimensions.cpp
|
|
|
|
dialogs/dialog_pns_diff_pair_dimensions_base.cpp
|
|
|
|
dialogs/dialog_pns_length_tuning_settings.cpp
|
|
|
|
dialogs/dialog_pns_length_tuning_settings_base.cpp
|
2014-07-15 16:53:13 +00:00
|
|
|
dialogs/dialog_non_copper_zones_properties.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_non_copper_zones_properties_base.cpp
|
|
|
|
dialogs/dialog_pad_properties.cpp
|
|
|
|
dialogs/dialog_pad_properties_base.cpp
|
|
|
|
dialogs/dialog_plot_base.cpp
|
2012-09-15 12:13:03 +00:00
|
|
|
dialogs/dialog_plot.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_print_for_modedit.cpp
|
|
|
|
dialogs/dialog_print_for_modedit_base.cpp
|
|
|
|
dialogs/dialog_print_using_printer.cpp
|
|
|
|
dialogs/dialog_print_using_printer_base.cpp
|
2010-11-26 11:55:34 +00:00
|
|
|
dialogs/dialog_mask_clearance.cpp
|
|
|
|
dialogs/dialog_mask_clearance_base.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_SVG_print.cpp
|
|
|
|
dialogs/dialog_SVG_print_base.cpp
|
2014-07-23 10:28:48 +00:00
|
|
|
dialogs/dialog_select_pretty_lib.cpp
|
2016-03-16 14:14:00 +00:00
|
|
|
dialogs/dialog_select_net_from_list_base.cpp
|
|
|
|
dialogs/dialog_select_net_from_list.cpp
|
2014-07-23 10:28:48 +00:00
|
|
|
dialogs/dialog_select_pretty_lib_base.cpp
|
2013-06-05 14:24:03 +00:00
|
|
|
dialogs/dialog_set_grid.cpp
|
2010-11-24 20:37:00 +00:00
|
|
|
dialogs/dialog_set_grid_base.cpp
|
2013-08-28 16:14:39 +00:00
|
|
|
dialogs/dialog_target_properties_base.cpp
|
2015-07-09 11:35:51 +00:00
|
|
|
dialogs/dialog_track_via_properties.cpp
|
|
|
|
dialogs/dialog_track_via_properties_base.cpp
|
2014-05-14 14:28:39 +00:00
|
|
|
dialogs/dialog_track_via_size.cpp
|
|
|
|
dialogs/dialog_track_via_size_base.cpp
|
2016-01-29 10:24:39 +00:00
|
|
|
dialogs/dialog_update_pcb_base.cpp
|
|
|
|
dialogs/dialog_update_pcb.cpp
|
2012-05-09 17:37:25 +00:00
|
|
|
footprint_wizard.cpp
|
|
|
|
footprint_wizard_frame.cpp
|
2012-05-09 23:04:08 +00:00
|
|
|
dialogs/dialog_footprint_wizard_list_base.cpp
|
|
|
|
dialogs/dialog_footprint_wizard_list.cpp
|
2014-12-21 14:13:14 +00:00
|
|
|
dialogs/wizard_add_fplib_base.cpp
|
|
|
|
dialogs/wizard_add_fplib.cpp
|
2015-08-20 07:14:44 +00:00
|
|
|
${GITHUB_3DLIBRARIES_WIZARD}
|
2010-11-24 15:10:33 +00:00
|
|
|
)
|
|
|
|
|
2013-10-24 16:44:38 +00:00
|
|
|
set( PCBNEW_IMPORT_DXF
|
2013-10-26 07:03:06 +00:00
|
|
|
import_dxf/dialog_dxf_import_base.cpp
|
2013-10-24 16:44:38 +00:00
|
|
|
import_dxf/dialog_dxf_import.cpp
|
|
|
|
import_dxf/dxf2brd_items.cpp
|
|
|
|
)
|
|
|
|
|
2014-01-07 20:41:32 +00:00
|
|
|
set( PCBNEW_EXPORTERS
|
|
|
|
exporters/export_d356.cpp
|
|
|
|
exporters/export_gencad.cpp
|
|
|
|
exporters/export_idf.cpp
|
|
|
|
exporters/export_vrml.cpp
|
|
|
|
exporters/gen_drill_report_files.cpp
|
|
|
|
exporters/gen_modules_placefile.cpp
|
|
|
|
exporters/gendrill_Excellon_writer.cpp
|
|
|
|
)
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_AUTOROUTER_SRCS
|
2013-11-27 13:20:42 +00:00
|
|
|
autorouter/rect_placement/rect_placement.cpp
|
|
|
|
autorouter/move_and_route_event_functions.cpp
|
|
|
|
autorouter/auto_place_footprints.cpp
|
2012-06-05 19:07:33 +00:00
|
|
|
autorouter/autorout.cpp
|
|
|
|
autorouter/routing_matrix.cpp
|
|
|
|
autorouter/dist.cpp
|
|
|
|
autorouter/queue.cpp
|
2013-11-27 13:20:42 +00:00
|
|
|
autorouter/spread_footprints.cpp
|
2012-06-05 19:07:33 +00:00
|
|
|
autorouter/solve.cpp
|
|
|
|
autorouter/graphpcb.cpp
|
|
|
|
autorouter/work.cpp
|
|
|
|
)
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_CLASS_SRCS
|
2016-05-10 15:57:21 +00:00
|
|
|
board_commit.cpp
|
2012-02-09 20:33:38 +00:00
|
|
|
tool_modview.cpp
|
|
|
|
modview_frame.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
pcbframe.cpp
|
2014-07-09 11:50:27 +00:00
|
|
|
pcb_base_edit_frame.cpp
|
2014-09-24 16:56:20 +00:00
|
|
|
append_board_to_current.cpp
|
2016-04-02 12:52:29 +00:00
|
|
|
array_creator.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
attribut.cpp
|
|
|
|
board_items_to_polygon_shape_transform.cpp
|
2016-01-29 10:24:39 +00:00
|
|
|
board_netlist_updater.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
block.cpp
|
|
|
|
block_module_editor.cpp
|
|
|
|
build_BOM_from_board.cpp
|
|
|
|
class_pcb_layer_widget.cpp
|
2012-06-25 20:51:19 +00:00
|
|
|
class_pcb_layer_box_selector.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
clean.cpp
|
|
|
|
connect.cpp
|
|
|
|
controle.cpp
|
|
|
|
dimension.cpp
|
|
|
|
cross-probing.cpp
|
|
|
|
deltrack.cpp
|
|
|
|
${PCBNEW_DIALOGS}
|
2013-10-24 16:44:38 +00:00
|
|
|
${PCBNEW_IMPORT_DXF}
|
2014-01-07 20:41:32 +00:00
|
|
|
${PCBNEW_EXPORTERS}
|
2008-01-18 17:10:54 +00:00
|
|
|
dragsegm.cpp
|
|
|
|
drc.cpp
|
2010-09-20 16:21:47 +00:00
|
|
|
drc_clearance_test_functions.cpp
|
2010-09-18 17:55:08 +00:00
|
|
|
drc_marker_functions.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
edgemod.cpp
|
|
|
|
edit.cpp
|
|
|
|
editedge.cpp
|
|
|
|
editmod.cpp
|
|
|
|
editrack.cpp
|
|
|
|
editrack-part2.cpp
|
2009-06-21 13:37:27 +00:00
|
|
|
edit_pcb_text.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
edit_track_width.cpp
|
|
|
|
edtxtmod.cpp
|
2009-10-03 17:18:08 +00:00
|
|
|
event_handlers_tracks_vias_sizes.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
files.cpp
|
|
|
|
globaleditpad.cpp
|
2011-10-17 20:01:27 +00:00
|
|
|
highlight.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
hotkeys.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
hotkeys_board_editor.cpp
|
|
|
|
hotkeys_module_editor.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
initpcb.cpp
|
2010-01-21 07:41:30 +00:00
|
|
|
layer_widget.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
librairi.cpp
|
|
|
|
loadcmp.cpp
|
2009-10-10 17:27:53 +00:00
|
|
|
magnetic_tracks_functions.cpp
|
2010-01-17 20:25:10 +00:00
|
|
|
menubar_modedit.cpp
|
|
|
|
menubar_pcbframe.cpp
|
2011-11-07 18:04:19 +00:00
|
|
|
minimun_spanning_tree.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
modedit.cpp
|
|
|
|
modedit_onclick.cpp
|
|
|
|
modeditoptions.cpp
|
|
|
|
moduleframe.cpp
|
|
|
|
modules.cpp
|
|
|
|
move-drag_pads.cpp
|
|
|
|
move_or_drag_track.cpp
|
|
|
|
muonde.cpp
|
|
|
|
muwave_command.cpp
|
|
|
|
netlist.cpp
|
|
|
|
onleftclick.cpp
|
|
|
|
onrightclick.cpp
|
2012-09-11 07:33:17 +00:00
|
|
|
pad_edition_functions.cpp
|
2009-10-27 13:48:24 +00:00
|
|
|
pcbnew_config.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
pcbplot.cpp
|
2014-07-09 08:57:32 +00:00
|
|
|
pcb_draw_panel_gal.cpp
|
2012-09-24 16:03:03 +00:00
|
|
|
plot_board_layers.cpp
|
|
|
|
plot_brditems_plotter.cpp
|
2010-01-26 11:05:30 +00:00
|
|
|
print_board_functions.cpp
|
|
|
|
printout_controler.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
ratsnest.cpp
|
2008-02-06 22:32:15 +00:00
|
|
|
specctra_import.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
swap_layers.cpp
|
2013-08-28 16:14:39 +00:00
|
|
|
target_edit.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
tool_modedit.cpp
|
|
|
|
tool_onrightclick.cpp
|
|
|
|
tool_pcb.cpp
|
2009-09-27 11:00:21 +00:00
|
|
|
toolbars_update_user_interface.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
tracepcb.cpp
|
|
|
|
tr_modif.cpp
|
2016-05-25 09:52:43 +00:00
|
|
|
undo_redo.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
xchgmod.cpp
|
2011-10-25 16:24:56 +00:00
|
|
|
zones_convert_brd_items_to_polygons_with_Boost.cpp
|
2010-11-18 13:38:08 +00:00
|
|
|
zones_convert_to_polygons_aux_functions.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
zones_by_polygon.cpp
|
2009-08-23 15:22:44 +00:00
|
|
|
zones_by_polygon_fill_functions.cpp
|
2008-10-02 13:24:31 +00:00
|
|
|
zone_filling_algorithm.cpp
|
2009-08-23 15:22:44 +00:00
|
|
|
zones_functions_for_undo_redo.cpp
|
2008-10-11 19:27:43 +00:00
|
|
|
zones_polygons_insulated_copper_islands.cpp
|
2008-11-18 18:13:55 +00:00
|
|
|
zones_polygons_test_connections.cpp
|
2008-10-02 13:24:31 +00:00
|
|
|
zones_test_and_combine_areas.cpp
|
2012-05-09 17:37:25 +00:00
|
|
|
class_footprint_wizard.cpp
|
2013-11-10 19:15:09 +00:00
|
|
|
|
2013-08-02 14:53:50 +00:00
|
|
|
tools/selection_tool.cpp
|
|
|
|
tools/selection_area.cpp
|
2014-07-09 13:10:32 +00:00
|
|
|
tools/selection_conditions.cpp
|
2015-04-30 08:46:08 +00:00
|
|
|
tools/conditional_menu.cpp
|
2013-09-16 09:00:59 +00:00
|
|
|
tools/bright_box.cpp
|
2014-02-27 16:29:08 +00:00
|
|
|
tools/edit_points.cpp
|
2014-03-18 15:55:06 +00:00
|
|
|
tools/edit_constraints.cpp
|
2014-02-27 16:29:08 +00:00
|
|
|
tools/point_editor.cpp
|
|
|
|
tools/drawing_tool.cpp
|
2013-12-03 15:09:03 +00:00
|
|
|
tools/edit_tool.cpp
|
2014-03-24 07:45:05 +00:00
|
|
|
tools/pcbnew_control.cpp
|
2014-07-09 11:50:27 +00:00
|
|
|
tools/pcb_editor_control.cpp
|
2014-07-09 13:02:56 +00:00
|
|
|
tools/module_tools.cpp
|
2014-07-09 12:23:13 +00:00
|
|
|
tools/placement_tool.cpp
|
2013-09-27 18:52:34 +00:00
|
|
|
tools/common_actions.cpp
|
2015-02-18 00:29:54 +00:00
|
|
|
tools/grid_helper.cpp
|
2015-06-18 15:51:51 +00:00
|
|
|
tools/picker_tool.cpp
|
2016-06-08 11:19:53 +00:00
|
|
|
tools/zoom_tool.cpp
|
2015-02-18 00:04:47 +00:00
|
|
|
tools/tools_common.cpp
|
2017-01-11 17:22:53 +00:00
|
|
|
tools/tool_menu.cpp
|
2015-04-30 08:46:05 +00:00
|
|
|
|
|
|
|
tools/grid_menu.cpp
|
|
|
|
tools/zoom_menu.cpp
|
2015-07-07 16:36:56 +00:00
|
|
|
tools/size_menu.cpp
|
2008-10-02 13:24:31 +00:00
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} )
|
2012-03-11 19:48:43 +00:00
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
|
|
|
# extra sources from common
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_COMMON_SRCS
|
2012-04-25 19:33:24 +00:00
|
|
|
../common/dialogs/dialog_page_settings.cpp
|
|
|
|
../common/base_units.cpp
|
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_SCRIPTING_DIALOGS
|
2012-07-16 05:53:22 +00:00
|
|
|
dialogs/dialog_scripting_base.cpp
|
|
|
|
dialogs/dialog_scripting.cpp
|
2013-01-13 00:34:16 +00:00
|
|
|
)
|
2012-07-16 05:53:22 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_SCRIPTING_PYTHON_HELPERS
|
2016-09-20 15:59:43 +00:00
|
|
|
../common/swig/wx_python_helpers.cpp
|
|
|
|
swig/python_scripting.cpp
|
|
|
|
swig/pcbnew_scripting_helpers.cpp
|
|
|
|
swig/pcbnew_footprint_wizards.cpp
|
2013-01-13 00:34:16 +00:00
|
|
|
)
|
2012-03-17 15:17:13 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING )
|
|
|
|
set( PCBNEW_SCRIPTING_SRCS
|
2013-01-13 00:34:16 +00:00
|
|
|
${PCBNEW_SCRIPTING_DIALOGS}
|
2012-10-15 22:30:01 +00:00
|
|
|
pcbnew_wrap.cxx
|
|
|
|
${PCBNEW_SCRIPTING_PYTHON_HELPERS}
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2016-10-05 12:34:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Swig generated files do not use the override specifier, therefore
|
|
|
|
# disable suggest-override warnings
|
|
|
|
if (COMPILER_SUPPORTS_WSUGGEST_OVERRIDE)
|
2016-10-06 13:06:42 +00:00
|
|
|
set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
|
2016-10-05 12:34:04 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS -Wno-suggest-override
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-02-28 21:30:46 +00:00
|
|
|
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
|
|
|
|
|
|
|
set( SWIG_FLAGS
|
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}/../scripting
|
2016-09-20 15:59:43 +00:00
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}/../common/swig
|
|
|
|
-I${WXPYTHON_SWIG_DIR}
|
2013-08-20 18:03:21 +00:00
|
|
|
)
|
2012-03-17 15:17:13 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( DEBUG )
|
|
|
|
set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
|
2013-01-13 00:34:16 +00:00
|
|
|
endif()
|
|
|
|
|
2012-10-15 22:30:01 +00:00
|
|
|
# collect CFLAGS , and pass them to swig later
|
|
|
|
get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
|
|
|
|
foreach( d ${DirDefs} )
|
2013-07-28 16:30:39 +00:00
|
|
|
set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
|
2012-10-15 22:30:01 +00:00
|
|
|
endforeach()
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-07-28 16:30:39 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING )
|
2012-08-04 09:43:27 +00:00
|
|
|
|
2013-07-28 16:30:39 +00:00
|
|
|
set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
|
2013-01-13 00:34:16 +00:00
|
|
|
|
2013-09-20 17:01:21 +00:00
|
|
|
if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
|
|
|
|
set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
|
|
|
|
set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
|
|
|
|
endif()
|
|
|
|
|
2013-01-13 00:34:16 +00:00
|
|
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
|
2013-09-20 17:01:21 +00:00
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
|
2013-09-23 15:19:39 +00:00
|
|
|
|
2013-03-18 19:36:07 +00:00
|
|
|
DEPENDS pcbcommon
|
2015-04-27 19:27:59 +00:00
|
|
|
DEPENDS plotcontroller.h
|
2015-04-29 15:37:37 +00:00
|
|
|
DEPENDS exporters/gendrill_Excellon_writer.h
|
2016-09-20 15:59:43 +00:00
|
|
|
DEPENDS swig/pcbnew.i
|
|
|
|
DEPENDS swig/board.i
|
|
|
|
DEPENDS swig/board_item.i
|
2016-09-21 01:07:41 +00:00
|
|
|
DEPENDS swig/board_item_container.i
|
|
|
|
DEPENDS swig/dimension.i
|
|
|
|
DEPENDS swig/drawsegment.i
|
|
|
|
DEPENDS swig/edge_mod.i
|
|
|
|
DEPENDS swig/marker_pcb.i
|
|
|
|
DEPENDS swig/mire.i
|
2016-09-20 15:59:43 +00:00
|
|
|
DEPENDS swig/module.i
|
2016-09-21 01:07:41 +00:00
|
|
|
DEPENDS swig/netclass.i
|
|
|
|
DEPENDS swig/netinfo.i
|
|
|
|
DEPENDS swig/pad.i
|
|
|
|
DEPENDS swig/pcb_text.i
|
2016-09-20 15:59:43 +00:00
|
|
|
DEPENDS swig/plugins.i
|
2016-09-21 01:07:41 +00:00
|
|
|
DEPENDS swig/text_mod.i
|
|
|
|
DEPENDS swig/track.i
|
2016-09-20 15:59:43 +00:00
|
|
|
DEPENDS swig/units.i
|
2016-09-21 01:07:41 +00:00
|
|
|
DEPENDS swig/zone.i
|
|
|
|
|
2016-09-20 15:59:43 +00:00
|
|
|
DEPENDS ../common/swig/dlist.i
|
|
|
|
DEPENDS ../common/swig/kicad.i
|
|
|
|
DEPENDS ../common/swig/wx.i
|
|
|
|
DEPENDS ../common/swig/ki_exception.i
|
2013-01-13 00:34:16 +00:00
|
|
|
DEPENDS ../scripting/kicadplugins.i
|
|
|
|
|
2013-09-20 17:01:21 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i # this makes docstrings.i available if it doesn't exist
|
2013-09-23 15:19:39 +00:00
|
|
|
|
2016-09-20 15:59:43 +00:00
|
|
|
COMMAND ${SWIG_EXECUTABLE} ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx swig/pcbnew.i
|
2013-09-21 22:03:02 +00:00
|
|
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
|
2013-01-13 00:34:16 +00:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
2014-04-08 04:55:53 +00:00
|
|
|
)
|
2012-04-08 14:25:49 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-02-28 21:30:46 +00:00
|
|
|
|
2012-03-11 19:48:43 +00:00
|
|
|
|
2013-09-23 15:19:39 +00:00
|
|
|
if( BUILD_GITHUB_PLUGIN )
|
|
|
|
set( GITHUB_PLUGIN_LIBRARIES github_plugin )
|
|
|
|
endif()
|
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
if( UNIX AND NOT APPLE )
|
2013-09-23 15:19:39 +00:00
|
|
|
list( APPEND PCBNEW_EXTRA_LIBS rt )
|
2013-01-13 00:34:16 +00:00
|
|
|
endif()
|
2012-03-17 15:17:13 +00:00
|
|
|
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING_MODULES )
|
2012-01-23 04:33:36 +00:00
|
|
|
|
2013-07-28 16:30:39 +00:00
|
|
|
#message( "building pcbnew scripting" )
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( CMAKE_SWIG_FLAGS ${SWIG_FLAGS} )
|
2016-09-20 15:59:43 +00:00
|
|
|
set_source_files_properties( swig/pcbnew.i PROPERTIES CPLUSPLUS ON )
|
|
|
|
|
|
|
|
# https://cmake.org/cmake/help/v3.2/module/UseSWIG.html
|
|
|
|
# Set this ..EXTRA_DEPS variable before invoking swig_add_module() macro
|
|
|
|
set( SWIG_MODULE_pcbnew_EXTRA_DEPS
|
|
|
|
swig/board.i
|
|
|
|
swig/board_item.i
|
2016-09-21 01:07:41 +00:00
|
|
|
swig/board_item_container.i
|
|
|
|
swig/dimension.i
|
|
|
|
swig/drawsegment.i
|
|
|
|
swig/edge_mod.i
|
|
|
|
swig/marker_pcb.i
|
|
|
|
swig/mire.i
|
|
|
|
swig/module.i
|
|
|
|
swig/netclass.i
|
|
|
|
swig/netinfo.i
|
|
|
|
swig/pad.i
|
|
|
|
swig/pcb_text.i
|
2016-09-20 15:59:43 +00:00
|
|
|
swig/plugins.i
|
2016-09-21 01:07:41 +00:00
|
|
|
swig/text_mod.i
|
|
|
|
swig/track.i
|
2016-09-20 15:59:43 +00:00
|
|
|
swig/units.i
|
2016-09-21 01:07:41 +00:00
|
|
|
swig/zone.i
|
|
|
|
|
|
|
|
../common/swig/dlist.i
|
2016-09-20 15:59:43 +00:00
|
|
|
../common/swig/kicad.i
|
2016-09-21 01:07:41 +00:00
|
|
|
../common/swig/wx.i
|
|
|
|
../common/swig/ki_exception.i
|
|
|
|
../scripting/kicadplugins.i
|
2016-09-20 15:59:43 +00:00
|
|
|
)
|
2014-12-21 14:13:14 +00:00
|
|
|
|
* 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.
2014-03-20 06:47:30 +00:00
|
|
|
swig_add_module( pcbnew
|
|
|
|
python
|
2016-09-20 15:59:43 +00:00
|
|
|
swig/pcbnew.i
|
* 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.
2014-03-20 06:47:30 +00:00
|
|
|
${PCBNEW_SCRIPTING_PYTHON_HELPERS}
|
|
|
|
pcbnew.cpp
|
|
|
|
${PCBNEW_SRCS}
|
|
|
|
${PCBNEW_COMMON_SRCS}
|
|
|
|
)
|
2014-12-21 14:13:14 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
swig_link_libraries( pcbnew
|
2013-01-13 00:34:16 +00:00
|
|
|
3d-viewer
|
|
|
|
pcbcommon
|
2013-09-10 17:26:44 +00:00
|
|
|
pnsrouter
|
2013-01-13 00:34:16 +00:00
|
|
|
pcad2kicadpcb
|
2016-06-01 16:40:18 +00:00
|
|
|
common
|
2013-10-24 16:44:38 +00:00
|
|
|
lib_dxf
|
2014-06-05 18:37:04 +00:00
|
|
|
idf3
|
2013-01-13 00:34:16 +00:00
|
|
|
polygon
|
|
|
|
bitmaps
|
2013-07-08 15:14:16 +00:00
|
|
|
gal
|
2013-01-13 00:34:16 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
2016-01-10 21:44:37 +00:00
|
|
|
${GITHUB_PLUGIN_LIBRARIES}
|
2013-01-13 00:34:16 +00:00
|
|
|
${GDI_PLUS_LIBRARIES}
|
|
|
|
${PYTHON_LIBRARIES}
|
|
|
|
${PCBNEW_EXTRA_LIBS}
|
2013-12-09 19:06:47 +00:00
|
|
|
${Boost_LIBRARIES} # must follow GITHUB
|
2013-01-13 00:34:16 +00:00
|
|
|
)
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-09-24 21:23:13 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
set_target_properties( _pcbnew PROPERTIES
|
2014-04-08 04:55:53 +00:00
|
|
|
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.so.map"
|
|
|
|
)
|
2013-09-24 21:23:13 +00:00
|
|
|
endif()
|
|
|
|
|
2014-04-10 00:55:34 +00:00
|
|
|
if( ${OPENMP_FOUND} )
|
|
|
|
set_property( TARGET _pcbnew APPEND_STRING
|
2014-10-08 18:41:36 +00:00
|
|
|
PROPERTY LINK_FLAGS " ${OpenMP_CXX_FLAGS}"
|
|
|
|
)
|
|
|
|
endif()
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-09-20 17:01:21 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
# Doxygen python documentation
|
|
|
|
###
|
|
|
|
|
|
|
|
if( DOXYGEN_FOUND )
|
|
|
|
if( KICAD_SCRIPTING )
|
2013-09-23 15:19:39 +00:00
|
|
|
|
2013-09-20 17:01:21 +00:00
|
|
|
# create XML files from doxygen parsing
|
|
|
|
add_custom_target( doxygen-python-xml
|
|
|
|
${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
|
|
|
|
COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
DEPENDS Doxyfile_xml
|
|
|
|
COMMENT "building doxygen docs into directory doxygen-python/html"
|
2014-04-08 04:55:53 +00:00
|
|
|
)
|
2013-09-20 17:01:21 +00:00
|
|
|
|
|
|
|
# create .i files from XML doxygen parsing, docstrings.i will include all of them
|
2013-09-23 15:19:39 +00:00
|
|
|
add_custom_target( xml-to-docstrings
|
2013-09-20 17:01:21 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
|
2013-09-21 22:03:02 +00:00
|
|
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
|
2013-09-20 17:01:21 +00:00
|
|
|
COMMENT "building docstring files"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
DEPENDS pcbnew.py
|
|
|
|
DEPENDS doxygen-python-xml
|
2013-09-23 15:19:39 +00:00
|
|
|
)
|
2013-09-20 17:01:21 +00:00
|
|
|
|
|
|
|
# create doxygen-python html
|
|
|
|
add_custom_target( doxygen-python
|
|
|
|
${CMAKE_COMMAND} -E remove_directory doxygen-python
|
2013-09-23 15:19:39 +00:00
|
|
|
COMMAND PYTHON_SOURCES_TO_DOC=${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
|
2013-09-20 17:01:21 +00:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
2013-09-21 22:34:15 +00:00
|
|
|
DEPENDS Doxyfile_python
|
2013-09-20 17:01:21 +00:00
|
|
|
DEPENDS xml-to-docstrings
|
|
|
|
DEPENDS pcbnew.py
|
|
|
|
COMMENT "building doxygen docs into directory doxygen-python/html"
|
2014-04-08 04:55:53 +00:00
|
|
|
)
|
2013-09-20 17:01:21 +00:00
|
|
|
endif()
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-09-20 17:01:21 +00:00
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
if( MINGW )
|
|
|
|
# PCBNEW_RESOURCES variable is set by the macro.
|
|
|
|
mingw_resource_compiler( pcbnew )
|
2016-01-28 16:53:24 +00:00
|
|
|
else()
|
|
|
|
set( PCBNEW_RESOURCES pcbnew.rc )
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2008-09-07 19:32:07 +00:00
|
|
|
|
2014-10-16 22:13:01 +00:00
|
|
|
|
|
|
|
if( APPLE )
|
|
|
|
# setup bundle
|
|
|
|
set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
|
|
|
|
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
|
2015-10-29 19:43:04 +00:00
|
|
|
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
|
2014-10-16 22:13:01 +00:00
|
|
|
set( MACOSX_BUNDLE_NAME pcbnew )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2009-12-03 06:30:54 +00:00
|
|
|
# Create a C++ compilable string initializer containing html text into a *.h file:
|
2009-12-03 06:25:35 +00:00
|
|
|
add_custom_command(
|
2016-08-30 13:04:25 +00:00
|
|
|
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
|
2010-09-29 20:39:53 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND}
|
2010-11-29 15:05:01 +00:00
|
|
|
-DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
|
2016-08-30 13:04:25 +00:00
|
|
|
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
|
2009-12-03 06:25:35 +00:00
|
|
|
-P ${CMAKE_MODULE_PATH}/Html2C.cmake
|
2010-11-29 15:05:01 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
|
2016-08-30 13:04:25 +00:00
|
|
|
COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
|
2010-11-29 15:05:01 +00:00
|
|
|
from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html"
|
2009-12-03 06:25:35 +00:00
|
|
|
)
|
|
|
|
|
2014-04-08 04:55:53 +00:00
|
|
|
set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp PROPERTIES
|
2016-08-30 13:04:25 +00:00
|
|
|
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
|
2009-12-03 06:30:54 +00:00
|
|
|
)
|
2009-12-03 06:25:35 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
add_subdirectory( pcad2kicadpcb_plugin )
|
2014-10-22 23:25:59 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( BUILD_GITHUB_PLUGIN )
|
|
|
|
add_subdirectory( github )
|
2014-02-19 21:39:21 +00:00
|
|
|
add_dependencies( github_plugin lib-dependencies )
|
2016-06-08 01:38:58 +00:00
|
|
|
# github_plugin depends on make_lexer outputs in common
|
|
|
|
add_dependencies( github_plugin pcbcommon )
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# a very small program launcher for pcbnew_kiface
|
|
|
|
add_executable( pcbnew WIN32 MACOSX_BUNDLE
|
|
|
|
../common/single_top.cpp
|
|
|
|
${PCBNEW_RESOURCES}
|
|
|
|
)
|
|
|
|
set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
|
|
|
|
)
|
|
|
|
target_link_libraries( pcbnew
|
|
|
|
#singletop # replaces common, giving us restrictive control and link warnings.
|
|
|
|
# There's way too much crap coming in from common yet.
|
|
|
|
common
|
|
|
|
bitmaps
|
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
)
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
set_target_properties( pcbnew PROPERTIES
|
|
|
|
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map" )
|
|
|
|
endif()
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# the main pcbnew program, in DSO form.
|
|
|
|
add_library( pcbnew_kiface MODULE
|
|
|
|
pcbnew.cpp
|
|
|
|
${PCBNEW_SRCS}
|
|
|
|
${PCBNEW_COMMON_SRCS}
|
|
|
|
${PCBNEW_SCRIPTING_SRCS}
|
|
|
|
)
|
|
|
|
set_target_properties( pcbnew_kiface PROPERTIES
|
|
|
|
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
|
|
|
|
# _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
|
|
|
|
OUTPUT_NAME pcbnew
|
|
|
|
PREFIX ${KIFACE_PREFIX}
|
|
|
|
SUFFIX ${KIFACE_SUFFIX}
|
|
|
|
)
|
|
|
|
|
|
|
|
if( ${OPENMP_FOUND} )
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
set_target_properties( pcbnew_kiface PROPERTIES
|
2014-10-26 19:54:48 +00:00
|
|
|
COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
endif()
|
2014-04-03 11:55:02 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
target_link_libraries( pcbnew_kiface
|
|
|
|
3d-viewer
|
|
|
|
pcbcommon
|
|
|
|
pnsrouter
|
|
|
|
pcad2kicadpcb
|
2016-06-01 16:40:18 +00:00
|
|
|
common
|
2014-10-26 19:54:48 +00:00
|
|
|
polygon
|
|
|
|
bitmaps
|
|
|
|
gal
|
|
|
|
lib_dxf
|
|
|
|
idf3
|
|
|
|
${wxWidgets_LIBRARIES}
|
2016-01-10 21:44:37 +00:00
|
|
|
${GITHUB_PLUGIN_LIBRARIES}
|
2014-10-26 19:54:48 +00:00
|
|
|
${GDI_PLUS_LIBRARIES}
|
|
|
|
${PYTHON_LIBRARIES}
|
|
|
|
${Boost_LIBRARIES} # must follow GITHUB
|
|
|
|
${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
|
|
|
|
${OPENMP_LIBRARIES}
|
|
|
|
)
|
|
|
|
set_source_files_properties( pcbnew.cpp PROPERTIES
|
|
|
|
# The KIFACE is in pcbnew.cpp, export it:
|
|
|
|
COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
|
|
|
|
)
|
|
|
|
|
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
set_target_properties( pcbnew_kiface PROPERTIES
|
|
|
|
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcbnew.kiface.map"
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
set_target_properties( pcbnew PROPERTIES
|
|
|
|
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map"
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
endif()
|
2014-03-22 11:35:33 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# if building pcbnew, then also build pcbnew_kiface if out of date.
|
|
|
|
add_dependencies( pcbnew pcbnew_kiface )
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# these 2 binaries are a matched set, keep them together:
|
|
|
|
if( APPLE )
|
|
|
|
set_target_properties( pcbnew PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
|
|
|
|
# puts binaries into the *.app bundle while linking
|
|
|
|
set_target_properties( pcbnew_kiface PROPERTIES
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
|
2014-04-08 04:55:53 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
# put individual bundle outside of main bundle as a first step
|
|
|
|
# will be pulled into the main bundle when creating main bundle
|
|
|
|
install( TARGETS pcbnew
|
|
|
|
DESTINATION ${KICAD_BIN}
|
|
|
|
COMPONENT binary
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
install( CODE "
|
|
|
|
# override default embedded path settings
|
|
|
|
${OSX_BUNDLE_OVERRIDE_PATHS}
|
|
|
|
|
|
|
|
# do all the work
|
|
|
|
include( BundleUtilities )
|
|
|
|
fixup_bundle( ${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew
|
|
|
|
\"\"
|
|
|
|
\"\"
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
" COMPONENT Runtime
|
|
|
|
)
|
|
|
|
else()
|
2014-10-16 22:13:01 +00:00
|
|
|
install( TARGETS pcbnew
|
|
|
|
DESTINATION ${KICAD_BIN}
|
|
|
|
COMPONENT binary
|
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
install( TARGETS pcbnew_kiface
|
|
|
|
DESTINATION ${KICAD_BIN}
|
|
|
|
COMPONENT binary
|
|
|
|
)
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
endif()
|
|
|
|
|
2014-02-19 21:39:21 +00:00
|
|
|
add_dependencies( pcbnew lib-dependencies )
|
2013-09-21 07:30:23 +00:00
|
|
|
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING )
|
2014-10-08 18:41:36 +00:00
|
|
|
if( NOT APPLE )
|
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
|
|
|
|
else()
|
|
|
|
# put into bundle at build time, it is relocated at install
|
|
|
|
add_custom_target( ScriptingPcbnewPyCopy ALL
|
2014-10-09 23:45:58 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
|
2014-10-08 18:41:36 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
|
|
|
|
COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
|
2014-04-08 04:55:53 +00:00
|
|
|
)
|
2014-10-09 23:45:58 +00:00
|
|
|
add_dependencies( ScriptingPcbnewPyCopy ScriptingWxpythonCopy )
|
2014-02-07 18:53:54 +00:00
|
|
|
endif()
|
2015-09-30 20:14:59 +00:00
|
|
|
|
2016-09-20 15:59:43 +00:00
|
|
|
# python plugins
|
|
|
|
install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
|
2015-09-30 20:14:59 +00:00
|
|
|
DESTINATION ${KICAD_DATA}/scripting/plugins
|
|
|
|
FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
|
|
|
|
)
|
2015-12-21 14:55:31 +00:00
|
|
|
|
2016-09-20 15:59:43 +00:00
|
|
|
# python shell
|
|
|
|
install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/kicad_pyshell/
|
2015-12-21 14:55:31 +00:00
|
|
|
DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell
|
|
|
|
FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
|
|
|
|
)
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-04-08 14:25:49 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING_MODULES )
|
|
|
|
add_custom_target( FixSwigImportsModuleScripting ALL
|
2013-09-21 22:03:02 +00:00
|
|
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
|
2013-01-23 16:35:40 +00:00
|
|
|
DEPENDS _pcbnew
|
2013-01-13 00:34:16 +00:00
|
|
|
COMMENT "Fixing swig_import_helper in Kicad scripting modules"
|
|
|
|
)
|
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
if( MINGW )
|
2013-08-20 18:03:21 +00:00
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
|
2014-10-08 18:41:36 +00:00
|
|
|
elseif( APPLE )
|
|
|
|
# put everything into bundle at build time, it is relocated at install
|
|
|
|
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
|
2014-10-09 23:45:58 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
|
2014-10-08 18:41:36 +00:00
|
|
|
DEPENDS _pcbnew
|
|
|
|
COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
|
|
|
|
)
|
2014-10-09 23:45:58 +00:00
|
|
|
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
|
2013-08-20 18:03:21 +00:00
|
|
|
else()
|
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST} )
|
|
|
|
endif()
|
2014-10-08 18:41:36 +00:00
|
|
|
endif()
|
2014-02-07 18:53:54 +00:00
|
|
|
|
2014-10-08 18:41:36 +00:00
|
|
|
if( APPLE )
|
|
|
|
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
|
|
|
# find wx-X.Y-osx_cocoa path below PYTHON_SITE_PACKAGE_PATH
|
2015-07-08 17:44:55 +00:00
|
|
|
file( GLOB WXPYTHON_DIR RELATIVE ${PYTHON_SITE_PACKAGE_PATH} ${PYTHON_SITE_PACKAGE_PATH}/wx-?.?-osx_cocoa )
|
|
|
|
if( NOT WXPYTHON_DIR )
|
2014-10-08 18:41:36 +00:00
|
|
|
message( FATAL_ERROR "Could not find 'wx-?.?-osx_cocoa' in '${PYTHON_SITE_PACKAGE_PATH}'" )
|
2014-03-10 22:37:59 +00:00
|
|
|
endif()
|
2014-10-08 18:41:36 +00:00
|
|
|
# copy contents
|
|
|
|
add_custom_target( ScriptingWxpythonCopy ALL
|
2015-07-08 17:44:55 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${PYTHON_SITE_PACKAGE_PATH}/${WXPYTHON_DIR}" "${PYTHON_DEST}/${WXPYTHON_DIR}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_SITE_PACKAGE_PATH}/wxversion.py" "${PYTHON_DEST}"
|
2014-10-08 18:41:36 +00:00
|
|
|
COMMENT "Copying wxPython into ${PYTHON_DEST}"
|
|
|
|
)
|
2014-02-07 18:53:54 +00:00
|
|
|
endif()
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|