2013-09-24 21:23:13 +00:00
|
|
|
|
2013-09-24 21:26:23 +00:00
|
|
|
set( MAKE_LINK_MAPS false )
|
2013-09-24 21:23:13 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
add_definitions( -DPCBNEW )
|
2013-09-10 17:26:44 +00:00
|
|
|
add_subdirectory(router)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
|
|
|
file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting )
|
|
|
|
find_package( SWIG REQUIRED )
|
|
|
|
include( ${SWIG_USE_FILE} )
|
|
|
|
|
|
|
|
# Infrequently needed headers go at end of search paths, append to INC_AFTER
|
|
|
|
set( INC_AFTER ${INC_AFTER} ${CMAKE_CURRENT_SOURCE_DIR}/scripting )
|
|
|
|
|
|
|
|
#message( STATUS "pcbnew INC_AFTER:${INC_AFTER}" )
|
|
|
|
endif()
|
2012-07-22 12:15:38 +00:00
|
|
|
|
2012-02-28 21:30:46 +00:00
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Includes
|
|
|
|
###
|
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
|
2013-10-24 16:44:38 +00:00
|
|
|
../lib_dxf
|
|
|
|
./import_dxf
|
2012-01-23 04:33:36 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Sources
|
|
|
|
#
|
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
|
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
|
|
|
|
dialogs/dialog_exchange_modules_base.cpp
|
2013-01-13 16:55:07 +00:00
|
|
|
dialogs/dialog_export_vrml_base.cpp
|
|
|
|
dialogs/dialog_export_vrml.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
|
|
|
|
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
|
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
|
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_pcbnew_config_libs_and_paths.cpp
|
|
|
|
dialogs/dialog_pcbnew_config_libs_and_paths_fbp.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 17:47:35 +00:00
|
|
|
dialogs/dialog_orient_footprints.cpp
|
|
|
|
dialogs/dialog_orient_footprints_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
|
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
|
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
|
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
|
|
|
|
)
|
|
|
|
|
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
|
2012-02-09 20:33:38 +00:00
|
|
|
tool_modview.cpp
|
|
|
|
modview_frame.cpp
|
2010-11-24 15:10:33 +00:00
|
|
|
pcbframe.cpp
|
|
|
|
attribut.cpp
|
|
|
|
board_items_to_polygon_shape_transform.cpp
|
|
|
|
board_undo_redo.cpp
|
|
|
|
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}
|
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
|
2013-09-13 09:49:55 +00:00
|
|
|
export_d356.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
export_gencad.cpp
|
2010-04-19 06:21:56 +00:00
|
|
|
export_vrml.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
files.cpp
|
2008-01-18 17:09:39 +00:00
|
|
|
gen_drill_report_files.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
gen_modules_placefile.cpp
|
2012-10-05 12:25:12 +00:00
|
|
|
gendrill_Excellon_writer.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
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
|
|
|
|
modedit_undo_redo.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
|
2008-01-18 17:10:54 +00:00
|
|
|
pcbnew.cpp
|
2009-10-27 13:48:24 +00:00
|
|
|
pcbnew_config.cpp
|
2008-01-18 17:10:54 +00:00
|
|
|
pcbplot.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
|
2013-11-25 15:50:03 +00:00
|
|
|
ratsnest_data.cpp
|
|
|
|
ratsnest_viewitem.cpp
|
2013-10-04 12:48:50 +00:00
|
|
|
# specctra.cpp #moved in pcbcommon lib
|
2013-10-04 12:22:33 +00:00
|
|
|
# specctra_export.cpp
|
|
|
|
# specctra_keywords.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
|
|
|
|
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
|
2010-01-26 11:05:30 +00:00
|
|
|
zones_non_copper_type_functions.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
|
2013-09-16 09:00:59 +00:00
|
|
|
tools/bright_box.cpp
|
2013-09-09 07:34:52 +00:00
|
|
|
tools/move_tool.cpp
|
2013-08-02 14:53:50 +00:00
|
|
|
tools/pcb_tools.cpp
|
2013-09-27 18:52:34 +00:00
|
|
|
tools/common_actions.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
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# We need some 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
|
|
|
|
2012-02-28 21:30:46 +00:00
|
|
|
##
|
|
|
|
# Scripting sources
|
|
|
|
##
|
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
|
|
|
|
2012-03-11 19:48:43 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( PCBNEW_SCRIPTING_PYTHON_HELPERS
|
2012-07-16 05:53:22 +00:00
|
|
|
../scripting/wx_python_helpers.cpp
|
|
|
|
../scripting/python_scripting.cpp
|
|
|
|
scripting/pcbnew_scripting_helpers.cpp
|
|
|
|
scripting/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}
|
|
|
|
)
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2012-02-28 21:30:46 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Scripting build
|
|
|
|
##
|
|
|
|
|
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}
|
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
|
|
|
-I${CMAKE_CURRENT_SOURCE_DIR}/../scripting
|
|
|
|
)
|
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
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2012-10-15 22:30:01 +00:00
|
|
|
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
|
2013-01-13 00:34:16 +00:00
|
|
|
DEPENDS scripting/pcbnew.i
|
|
|
|
DEPENDS scripting/board.i
|
|
|
|
DEPENDS scripting/board_item.i
|
|
|
|
DEPENDS scripting/module.i
|
|
|
|
DEPENDS scripting/plugins.i
|
|
|
|
DEPENDS scripting/units.i
|
|
|
|
DEPENDS ../scripting/dlist.i
|
|
|
|
DEPENDS ../scripting/kicad.i
|
|
|
|
DEPENDS ../scripting/wx.i
|
|
|
|
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
|
|
|
|
2013-01-13 00:34:16 +00:00
|
|
|
COMMAND ${SWIG_EXECUTABLE} ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx scripting/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}
|
2012-10-15 22:30:01 +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
|
|
|
###
|
|
|
|
# _pcbnew DLL/DSO file creation
|
|
|
|
###
|
|
|
|
|
2013-09-23 15:19:39 +00:00
|
|
|
if( BUILD_GITHUB_PLUGIN )
|
|
|
|
set( GITHUB_PLUGIN_LIBRARIES github_plugin )
|
|
|
|
endif()
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) AND NOT WIN32 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} )
|
|
|
|
set_source_files_properties( scripting/pcbnew.i PROPERTIES CPLUSPLUS ON )
|
|
|
|
swig_add_module( pcbnew python scripting/pcbnew.i ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} )
|
|
|
|
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-12-30 00:36:57 +00:00
|
|
|
common
|
2013-01-13 00:34:16 +00:00
|
|
|
pcad2kicadpcb
|
2013-10-24 16:44:38 +00:00
|
|
|
lib_dxf
|
2013-09-23 15:19:39 +00:00
|
|
|
${GITHUB_PLUGIN_LIBRARIES}
|
2013-01-13 00:34:16 +00:00
|
|
|
polygon
|
|
|
|
bitmaps
|
2013-07-08 15:14:16 +00:00
|
|
|
gal
|
2013-11-25 15:50:03 +00:00
|
|
|
${GLEW_LIBRARIES}
|
|
|
|
${CAIRO_LIBRARIES}
|
2013-12-30 00:27:03 +00:00
|
|
|
${PIXMAN_LIBRARY}
|
2013-01-13 00:34:16 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${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-21 22:04:59 +00:00
|
|
|
# create .i files from XML doxygen parsing, docstrings.i will include all of them
|
|
|
|
add_custom_target( qa
|
|
|
|
COMMAND PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} ${PYTHON_EXECUTABLE} test.py
|
2013-09-23 15:19:39 +00:00
|
|
|
|
2013-09-21 22:04:59 +00:00
|
|
|
COMMENT "running qa"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripting/qa
|
2013-09-23 15:19:39 +00:00
|
|
|
)
|
2013-09-21 22:04:59 +00:00
|
|
|
|
2013-09-24 21:23:13 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
# generate a link map with cross reference
|
|
|
|
set_target_properties( _pcbnew PROPERTIES LINK_FLAGS "-Wl,-cref -Wl,-Map=_pcbnew.map" )
|
|
|
|
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
|
|
|
|
###
|
|
|
|
|
|
|
|
find_package( Doxygen )
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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
|
2013-09-23 15:19:39 +00:00
|
|
|
|
2013-09-21 22:03:02 +00:00
|
|
|
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"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
message( STATUS "WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created" )
|
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
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Windows resource file
|
|
|
|
###
|
2013-08-20 18:03:21 +00:00
|
|
|
if( WIN32 )
|
|
|
|
if( MINGW )
|
2008-04-18 08:04:54 +00:00
|
|
|
# PCBNEW_RESOURCES variable is set by the macro.
|
2013-08-20 18:03:21 +00:00
|
|
|
mingw_resource_compiler( pcbnew )
|
|
|
|
else()
|
|
|
|
set( PCBNEW_RESOURCES pcbnew.rc )
|
|
|
|
endif()
|
|
|
|
endif()
|
2008-09-07 19:32:07 +00:00
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Set properties for APPLE on pcbnew target
|
|
|
|
###
|
2013-08-20 18:03:21 +00:00
|
|
|
if( APPLE )
|
|
|
|
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 )
|
|
|
|
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew )
|
|
|
|
set( MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
|
|
|
|
endif()
|
2007-11-08 07:17:37 +00:00
|
|
|
|
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(
|
2010-11-29 15:49:22 +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
|
|
|
|
-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
|
|
|
|
COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
|
|
|
|
from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html"
|
2009-12-03 06:25:35 +00:00
|
|
|
)
|
|
|
|
|
2010-11-29 15:05:01 +00:00
|
|
|
set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp
|
2009-12-03 06:30:54 +00:00
|
|
|
PROPERTIES
|
2010-11-29 15:05:01 +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
|
|
|
|
2011-01-19 20:46:07 +00:00
|
|
|
|
|
|
|
# auto-generate specctra_lexer.h and specctra_keywords.cpp
|
|
|
|
make_lexer(
|
2013-01-13 00:34:16 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/specctra.keywords
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/specctra_lexer.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/specctra_keywords.cpp
|
|
|
|
DSN
|
2013-05-31 21:22:34 +00:00
|
|
|
|
|
|
|
# Pass header file with dependency on *_lexer.h as extra_arg
|
|
|
|
specctra.h
|
2013-01-13 00:34:16 +00:00
|
|
|
)
|
2011-01-19 20:46:07 +00:00
|
|
|
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
###
|
|
|
|
# subcomponents of pcbnew
|
|
|
|
###
|
|
|
|
add_subdirectory( pcad2kicadpcb_plugin )
|
|
|
|
if( BUILD_GITHUB_PLUGIN )
|
|
|
|
add_subdirectory( github )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Create the pcbnew executable
|
|
|
|
###
|
2013-08-20 18:03:21 +00:00
|
|
|
add_executable( pcbnew WIN32 MACOSX_BUNDLE
|
2012-01-23 04:33:36 +00:00
|
|
|
${PCBNEW_SRCS}
|
|
|
|
${PCBNEW_COMMON_SRCS}
|
2012-02-28 21:30:46 +00:00
|
|
|
${PCBNEW_SCRIPTING_SRCS}
|
2012-01-23 04:33:36 +00:00
|
|
|
${PCBNEW_RESOURCES}
|
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Set properties for APPLE on pcbnew target
|
|
|
|
###
|
2013-08-20 18:03:21 +00:00
|
|
|
if( APPLE )
|
|
|
|
set_target_properties( pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
|
|
|
|
endif()
|
2009-04-29 12:10:15 +00:00
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Link executable target pcbnew with correct libraries
|
|
|
|
###
|
2012-07-16 14:48:51 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
target_link_libraries( pcbnew
|
2012-01-23 04:33:36 +00:00
|
|
|
3d-viewer
|
|
|
|
pcbcommon
|
2013-09-10 17:26:44 +00:00
|
|
|
pnsrouter
|
2012-01-23 04:33:36 +00:00
|
|
|
common
|
2012-12-29 09:54:25 +00:00
|
|
|
pcad2kicadpcb
|
2013-01-02 04:05:48 +00:00
|
|
|
polygon
|
|
|
|
bitmaps
|
2013-08-10 09:14:16 +00:00
|
|
|
gal
|
2013-10-24 16:44:38 +00:00
|
|
|
lib_dxf
|
2013-09-24 21:23:13 +00:00
|
|
|
${GITHUB_PLUGIN_LIBRARIES}
|
2012-01-23 04:33:36 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
2012-01-25 14:56:52 +00:00
|
|
|
${OPENGL_LIBRARIES}
|
2012-01-23 04:33:36 +00:00
|
|
|
${GDI_PLUS_LIBRARIES}
|
2012-02-28 21:30:46 +00:00
|
|
|
${PYTHON_LIBRARIES}
|
2012-07-16 14:48:51 +00:00
|
|
|
${PCBNEW_EXTRA_LIBS}
|
2013-12-09 18:09:58 +00:00
|
|
|
${GLEW_LIBRARIES}
|
|
|
|
${CAIRO_LIBRARIES}
|
2013-12-30 00:27:03 +00:00
|
|
|
${PIXMAN_LIBRARY}
|
2013-12-09 19:06:47 +00:00
|
|
|
${Boost_LIBRARIES} # must follow GITHUB
|
Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
- VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
- VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
- EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
- GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
- WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
- PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
- STROKE_FONT - Implements stroke font drawing using GAL methods.
Most important changes to Kicad original code:
* EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
* EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
* There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
* Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
* Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
* Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
* Removed tools/class_painter.h, as now it is extended and included in source code.
Build changes:
* GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
* When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
* GAL-related code is compiled into a static library (common/libgal).
* Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 06:54:03 +00:00
|
|
|
)
|
2013-08-10 09:14:16 +00:00
|
|
|
|
|
|
|
# Only for win32 cross compilation using MXE
|
2013-11-10 19:15:09 +00:00
|
|
|
if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING )
|
2013-12-09 18:48:42 +00:00
|
|
|
target_link_libraries( pcbnew
|
2013-12-09 18:09:58 +00:00
|
|
|
opengl32
|
|
|
|
glu32
|
|
|
|
pixman-1
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
bz2
|
|
|
|
)
|
2013-11-10 19:15:09 +00:00
|
|
|
endif()
|
Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
- VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
- VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
- EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
- GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
- WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
- PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
- STROKE_FONT - Implements stroke font drawing using GAL methods.
Most important changes to Kicad original code:
* EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
* EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
* There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
* Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
* Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
* Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
* Removed tools/class_painter.h, as now it is extended and included in source code.
Build changes:
* GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
* When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
* GAL-related code is compiled into a static library (common/libgal).
* Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 06:54:03 +00:00
|
|
|
|
2013-09-24 21:23:13 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
# generate a link map with cross reference
|
|
|
|
set_target_properties( pcbnew PROPERTIES LINK_FLAGS "-Wl,-cref -Wl,-Map=pcbnew.map" )
|
2013-09-21 07:30:23 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2010-05-16 18:18:38 +00:00
|
|
|
###
|
|
|
|
# Add pcbnew as install target
|
|
|
|
###
|
2013-08-20 18:03:21 +00:00
|
|
|
install( TARGETS pcbnew
|
2012-01-23 04:33:36 +00:00
|
|
|
DESTINATION ${KICAD_BIN}
|
2013-08-20 18:03:21 +00:00
|
|
|
COMPONENT binary )
|
2008-03-31 01:32:15 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( KICAD_SCRIPTING )
|
|
|
|
add_custom_target( FixSwigImportsScripting 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"
|
|
|
|
)
|
2012-04-08 14:25:49 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
|
2013-01-13 00:34:16 +00:00
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
if( WIN32 )
|
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
|
|
|
|
else()
|
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST} )
|
|
|
|
endif()
|
|
|
|
endif()
|
2012-03-17 15:17:13 +00:00
|
|
|
|
2008-03-31 01:32:15 +00:00
|
|
|
|
2013-09-21 07:30:23 +00:00
|
|
|
# This one gets made only when testing.
|
|
|
|
add_executable( specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp )
|
|
|
|
target_link_libraries( specctra_test common ${wxWidgets_LIBRARIES} )
|
|
|
|
|
2010-01-05 17:45:38 +00:00
|
|
|
|
|
|
|
# This one gets made only when testing.
|
2013-08-20 18:03:21 +00:00
|
|
|
add_executable( layer_widget_test WIN32 EXCLUDE_FROM_ALL
|
2010-01-05 17:45:38 +00:00
|
|
|
layer_widget.cpp
|
|
|
|
)
|
2013-08-20 18:03:21 +00:00
|
|
|
target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} )
|
|
|
|
|