kicad/pcbnew/CMakeLists.txt

497 lines
14 KiB
CMake
Raw Normal View History

2008-03-11 15:57:54 +00:00
add_definitions(-DPCBNEW)
if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
2010-05-16 18:18:38 +00:00
###
# Includes
###
include_directories(BEFORE ${INC_BEFORE})
include_directories(
./dialogs
./autorouter
../3d-viewer
../common
${Boost_INCLUDE_DIR}
../polygon
../common/dialogs
2012-03-10 21:40:41 +00:00
./scripting
${INC_AFTER}
)
2010-05-16 18:18:38 +00:00
###
# Sources
#
set(PCBNEW_DIALOGS
dialogs/dialog_block_options_base.cpp
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
dialogs/dialog_design_rules.cpp
dialogs/dialog_design_rules_base.cpp
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
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
dialogs/dialog_export_vrml_base.cpp
dialogs/dialog_export_vrml.cpp
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
dialogs/dialog_freeroute_exchange.cpp
dialogs/dialog_freeroute_exchange_base.cpp
dialogs/dialog_gendrill.cpp
dialogs/dialog_gendrill_base.cpp
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
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
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
dialogs/dialog_graphic_item_properties_for_Modedit.cpp
dialogs/dialog_global_deletion.cpp
dialogs/dialog_global_deletion_base.cpp
dialogs/dialog_keepout_area_properties.cpp
dialogs/dialog_keepout_area_properties_base.cpp
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
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
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
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
dialogs/dialog_set_grid.cpp
2010-11-24 20:37:00 +00:00
dialogs/dialog_set_grid_base.cpp
footprint_wizard.cpp
footprint_wizard_frame.cpp
dialogs/dialog_footprint_wizard_list_base.cpp
dialogs/dialog_footprint_wizard_list.cpp
)
set(PCBNEW_AUTOROUTER_SRCS
autorouter/automove.cpp
autorouter/autoplac.cpp
autorouter/autorout.cpp
autorouter/routing_matrix.cpp
autorouter/dist.cpp
autorouter/queue.cpp
autorouter/solve.cpp
autorouter/graphpcb.cpp
autorouter/work.cpp
)
2012-03-11 19:48:43 +00:00
set(PCBNEW_CLASS_SRCS
tool_modview.cpp
modview.cpp
modview_frame.cpp
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
clean.cpp
connect.cpp
controle.cpp
dimension.cpp
cross-probing.cpp
deltrack.cpp
${PCBNEW_DIALOGS}
2008-01-18 17:10:54 +00:00
dragsegm.cpp
drc.cpp
drc_clearance_test_functions.cpp
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
export_gencad.cpp
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
gendrill_Excellon_writer.cpp
2008-01-18 17:10:54 +00:00
globaleditpad.cpp
highlight.cpp
2008-01-18 17:10:54 +00:00
hotkeys.cpp
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
magnetic_tracks_functions.cpp
2010-01-17 20:25:10 +00:00
menubar_modedit.cpp
menubar_pcbframe.cpp
minimun_spanning_tree.cpp
2008-01-18 17:10:54 +00:00
mirepcb.cpp
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
pad_edition_functions.cpp
2008-01-18 17:10:54 +00:00
pcbnew.cpp
pcbnew_config.cpp
2008-01-18 17:10:54 +00:00
pcbplot.cpp
plot_board_layers.cpp
plot_brditems_plotter.cpp
print_board_functions.cpp
printout_controler.cpp
2008-01-18 17:10:54 +00:00
ratsnest.cpp
2008-01-21 22:16:45 +00:00
specctra.cpp
specctra_export.cpp
2008-02-06 22:32:15 +00:00
specctra_import.cpp
specctra_keywords.cpp
2008-01-18 17:10:54 +00:00
swap_layers.cpp
tool_modedit.cpp
tool_onrightclick.cpp
tool_pcb.cpp
toolbars_update_user_interface.cpp
2008-01-18 17:10:54 +00:00
tracepcb.cpp
tr_modif.cpp
xchgmod.cpp
zones_convert_brd_items_to_polygons_with_Boost.cpp
zones_convert_to_polygons_aux_functions.cpp
2008-01-18 17:10:54 +00:00
zones_by_polygon.cpp
zones_by_polygon_fill_functions.cpp
zone_filling_algorithm.cpp
zones_functions_for_undo_redo.cpp
zones_non_copper_type_functions.cpp
zones_polygons_insulated_copper_islands.cpp
zones_polygons_test_connections.cpp
zones_test_and_combine_areas.cpp
class_footprint_wizard.cpp
)
2012-06-25 20:51:19 +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
###
set(PCBNEW_COMMON_SRCS
../common/dialogs/dialog_page_settings.cpp
../common/base_units.cpp
)
##
# Scripting sources
##
set(PCBNEW_SCRIPTING_DIALOGS
dialogs/dialog_scripting_base.cpp
dialogs/dialog_scripting.cpp
)
2012-03-11 19:48:43 +00:00
set(PCBNEW_SCRIPTING_PYTHON_HELPERS
../scripting/wx_python_helpers.cpp
../scripting/python_scripting.cpp
scripting/pcbnew_scripting_helpers.cpp
scripting/pcbnew_footprint_wizards.cpp
)
if (KICAD_SCRIPTING)
2012-10-15 22:30:01 +00:00
set(PCBNEW_SCRIPTING_SRCS
${PCBNEW_SCRIPTING_DIALOGS}
2012-10-15 22:30:01 +00:00
pcbnew_wrap.cxx
${PCBNEW_SCRIPTING_PYTHON_HELPERS}
)
endif(KICAD_SCRIPTING)
##
# Scripting build
##
if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
2012-10-15 22:30:01 +00:00
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 )
if (DEBUG)
set(SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG)
endif()
2012-10-15 22:30:01 +00:00
# collect CFLAGS , and pass them to swig later
2012-10-15 22:30:01 +00:00
get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
foreach( d ${DirDefs} )
set(SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
2012-10-15 22:30:01 +00:00
endforeach()
2012-10-15 22:30:01 +00:00
# check if we have IO_MGR and KICAD_PLUGIN available
if ( USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE )
set(SWIG_FLAGS ${SWIG_FLAGS} -DBUILD_WITH_PLUGIN)
2012-10-15 22:30:01 +00:00
endif(USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE)
2012-10-15 22:30:01 +00:00
if ( USE_PCBNEW_NANOMETRES )
set(SWIG_FLAGS ${SWIG_FLAGS} -DUSE_PCBNEW_NANOMETRES)
2012-10-15 22:30:01 +00:00
endif( USE_PCBNEW_NANOMETRES )
endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
if (KICAD_SCRIPTING)
set(SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
DEPENDS pcbcommon
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
COMMAND ${SWIG_EXECUTABLE} ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx scripting/pcbnew.i
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
2012-10-15 22:30:01 +00:00
)
endif(KICAD_SCRIPTING)
2012-03-11 19:48:43 +00:00
###
# _pcbnew DLL/DSO file creation
###
if ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32 AND NOT APPLE)
set ( PCBNEW_EXTRA_LIBS "rt" )
endif()
if (KICAD_SCRIPTING_MODULES)
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
3d-viewer
pcbcommon
common
pcad2kicadpcb
polygon
bitmaps
gal
${GLEW_LIBRARIES}
${CAIRO_LIBRARIES}
${wxWidgets_LIBRARIES}
${OPENGL_LIBRARIES}
${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES}
${PCBNEW_EXTRA_LIBS}
)
endif (KICAD_SCRIPTING_MODULES)
2010-05-16 18:18:38 +00:00
###
# Windows resource file
###
2008-03-11 15:57:54 +00:00
if(WIN32)
if(MINGW)
# PCBNEW_RESOURCES variable is set by the macro.
mingw_resource_compiler(pcbnew)
2008-03-11 15:57:54 +00:00
else(MINGW)
set(PCBNEW_RESOURCES pcbnew.rc)
endif(MINGW)
endif(WIN32)
2010-05-16 18:18:38 +00:00
###
# Set properties for APPLE on pcbnew target
###
2008-03-11 15:57:54 +00:00
if(APPLE)
set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns)
2008-06-15 16:31:32 +00:00
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)
2008-06-15 16:31:32 +00:00
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)
2008-03-11 15:57:54 +00:00
endif(APPLE)
2009-12-03 06:30:54 +00:00
# Create a C++ compilable string initializer containing html text into a *.h file:
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
2010-09-29 20:39:53 +00:00
COMMAND ${CMAKE_COMMAND}
-DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
-P ${CMAKE_MODULE_PATH}/Html2C.cmake
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"
)
set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp
2009-12-03 06:30:54 +00:00
PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
2009-12-03 06:30:54 +00:00
)
# auto-generate specctra_lexer.h and specctra_keywords.cpp
make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/specctra.keywords
${CMAKE_CURRENT_SOURCE_DIR}/specctra_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/specctra_keywords.cpp
DSN
# Pass header file with dependency on *_lexer.h as extra_arg
specctra.h
)
2010-05-16 18:18:38 +00:00
###
# Create the pcbnew executable
###
add_executable(pcbnew WIN32 MACOSX_BUNDLE
${PCBNEW_SRCS}
${PCBNEW_COMMON_SRCS}
${PCBNEW_SCRIPTING_SRCS}
${PCBNEW_RESOURCES}
)
2010-05-16 18:18:38 +00:00
###
# Set properties for APPLE on pcbnew target
###
if(APPLE)
2010-05-16 18:18:38 +00:00
set_target_properties(pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
2010-05-16 18:18:38 +00:00
###
# Link executable target pcbnew with correct libraries
###
target_link_libraries(pcbnew
3d-viewer
pcbcommon
common
pcad2kicadpcb
polygon
bitmaps
${wxWidgets_LIBRARIES}
${OPENGL_LIBRARIES}
${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES}
${PCBNEW_EXTRA_LIBS}
)
2008-03-31 01:32:15 +00:00
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
target_link_libraries(pcbnew
gal
${GLEW_LIBRARIES}
${CAIRO_LIBRARIES}
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
)
if(WIN32)
target_link_libraries(pcbnew
opengl32
glu32
pixman-1
fontconfig
freetype
bz2
)
endif(WIN32)
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
2010-05-16 18:18:38 +00:00
###
# Add pcbnew as install target
###
install(TARGETS pcbnew
DESTINATION ${KICAD_BIN}
COMPONENT binary)
2008-03-31 01:32:15 +00:00
if(KICAD_SCRIPTING)
add_custom_target(FixSwigImportsScripting ALL
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
DEPENDS pcbnew
COMMENT "Fixing swig_import_helper in Kicad scripting"
)
install(FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST})
endif(KICAD_SCRIPTING)
if (KICAD_SCRIPTING_MODULES)
2012-10-15 22:30:01 +00:00
add_custom_target(FixSwigImportsModuleScripting ALL
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
DEPENDS _pcbnew
COMMENT "Fixing swig_import_helper in Kicad scripting modules"
)
install(FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST})
if (WIN32)
install(FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST})
else(WIN32)
install(FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST})
endif(WIN32)
endif(KICAD_SCRIPTING_MODULES)
2008-03-31 01:32:15 +00:00
# The specctra test fails to build properly using MS Visual Studio.
if(NOT MSVC)
# 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})
endif(NOT MSVC)
2010-01-05 17:45:38 +00:00
# This one gets made only when testing.
add_executable(layer_widget_test WIN32 EXCLUDE_FROM_ALL
2010-01-05 17:45:38 +00:00
layer_widget.cpp
)
target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES})