You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

719 lines
20 KiB

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
13 years ago
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
13 years ago
11 years ago
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
13 years ago
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
13 years ago
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
13 years ago
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
13 years ago
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
13 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
5 years ago
14 years ago
  1. # Add all the warnings to the files
  2. if( COMPILER_SUPPORTS_WARNINGS )
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS_CXX}")
  4. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}")
  5. endif()
  6. if( KICAD_SPICE )
  7. set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
  8. endif()
  9. include_directories( BEFORE ${INC_BEFORE} )
  10. include_directories(
  11. ./dialogs
  12. ./widgets
  13. ./dialog_about
  14. ${CMAKE_SOURCE_DIR}/3d-viewer
  15. ${CMAKE_SOURCE_DIR}/pcbnew
  16. ${INC_AFTER}
  17. )
  18. if( NOT APPLE ) # windows and linux use openssl under curl
  19. find_package( OpenSSL REQUIRED )
  20. include_directories( SYSTEM ${OPENSSL_INCLUDE_DIR} )
  21. endif()
  22. set( GAL_SRCS
  23. # Common part
  24. basic_gal.cpp
  25. draw_panel_gal.cpp
  26. gl_context_mgr.cpp
  27. newstroke_font.cpp
  28. painter.cpp
  29. gal/color4d.cpp
  30. gal/dpi_scaling.cpp
  31. gal/gal_display_options.cpp
  32. gal/graphics_abstraction_layer.cpp
  33. gal/hidpi_gl_canvas.cpp
  34. gal/stroke_font.cpp
  35. view/view_controls.cpp
  36. view/view_overlay.cpp
  37. view/wx_view_controls.cpp
  38. view/zoom_controller.cpp
  39. # OpenGL GAL
  40. gal/opengl/opengl_gal.cpp
  41. gal/opengl/gl_resources.cpp
  42. gal/opengl/gl_builtin_shaders.cpp
  43. gal/opengl/shader.cpp
  44. gal/opengl/vertex_item.cpp
  45. gal/opengl/vertex_container.cpp
  46. gal/opengl/cached_container.cpp
  47. gal/opengl/cached_container_gpu.cpp
  48. gal/opengl/cached_container_ram.cpp
  49. gal/opengl/noncached_container.cpp
  50. gal/opengl/vertex_manager.cpp
  51. gal/opengl/gpu_manager.cpp
  52. gal/opengl/antialiasing.cpp
  53. gal/opengl/opengl_compositor.cpp
  54. gal/opengl/utils.cpp
  55. # Cairo GAL
  56. gal/cairo/cairo_gal.cpp
  57. gal/cairo/cairo_compositor.cpp
  58. gal/cairo/cairo_print.cpp
  59. )
  60. add_library( gal STATIC ${GAL_SRCS} )
  61. target_link_libraries( gal
  62. common # This is needed until the circular dependency is removed
  63. kimath
  64. bitmaps
  65. ${GLEW_LIBRARIES}
  66. ${CAIRO_LIBRARIES}
  67. ${PIXMAN_LIBRARIES}
  68. ${OPENGL_LIBRARIES}
  69. ${GDI_PLUS_LIBRARIES}
  70. )
  71. target_include_directories( gal PRIVATE
  72. $<TARGET_PROPERTY:nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>
  73. )
  74. # Only for win32 cross compilation using MXE
  75. if( WIN32 AND MSYS )
  76. add_definitions( -DGLEW_STATIC )
  77. endif()
  78. # A shared library subsetted from common which restricts what can go into
  79. # a single_top link image. By not linking to common, we control what does
  80. # statically go into single_top link images. My current thinking is that only
  81. # wxWidgets should be a shared link from single top, everything else should be
  82. # statically bound into it. Otherwise you will have DSO loading probs. After it
  83. # sets the LIB PATHS however, we want the *.kiface modules to use shared linking.
  84. add_library( singletop STATIC EXCLUDE_FROM_ALL
  85. confirm.cpp
  86. eda_doc.cpp
  87. kiway.cpp
  88. kiway_holder.cpp
  89. )
  90. # A shared library used by multiple *.kiface files and one or two program
  91. # launchers. Object files can migrate into here over time, but only if they are
  92. # surely needed and certainly used from more than one place without recompilation.
  93. # Functions and data all need to use the #include <import_export.h> and be declared
  94. # as APIEXPORT
  95. set( LIB_KICAD_SRCS
  96. string.cpp
  97. )
  98. if( future )
  99. add_library( lib_kicad SHARED
  100. )
  101. target_link_libraries( lib_kicad
  102. ${wxWidgets_LIBRARIES}
  103. )
  104. set_target_properties( lib_kicad PROPERTIES
  105. OUTPUT_NAME ki
  106. )
  107. install( TARGETS lib_kicad
  108. DESTINATION ${KICAD_BIN}
  109. COMPONENT binary
  110. )
  111. endif()
  112. # The build version string defaults to the value in the KiCadVersion.cmake file.
  113. # If being built inside a git repository, the git tag and commit hash are used to create
  114. # a new version string instead. The user can supply an additional string to be appended
  115. # to the end inside the KICAD_VERSION_EXTRA variable
  116. set( KICAD_VERSION_EXTRA "" CACHE STRING
  117. "User defined configuration string to append to KiCad version." )
  118. # Generate version header file.
  119. add_custom_target(
  120. version_header ALL
  121. COMMAND ${CMAKE_COMMAND}
  122. -DKICAD_VERSION_EXTRA=${KICAD_VERSION_EXTRA}
  123. -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h
  124. -DTEXT_OUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.txt
  125. -DSRC_PATH=${PROJECT_SOURCE_DIR}
  126. -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
  127. -P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake
  128. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
  129. BYPRODUCTS ${CMAKE_BINARY_DIR}/kicad_build_version.h
  130. COMMENT "Generating version string header"
  131. )
  132. set( COMMON_ABOUT_DLG_SRCS
  133. dialog_about/AboutDialog_main.cpp
  134. dialog_about/dialog_about.cpp
  135. dialog_about/dialog_about_base.cpp
  136. )
  137. set( COMMON_DLG_SRCS
  138. dialogs/dialog_color_picker.cpp
  139. dialogs/dialog_color_picker_base.cpp
  140. dialogs/dialog_configure_paths.cpp
  141. dialogs/dialog_configure_paths_base.cpp
  142. dialogs/dialog_display_info_HTML_base.cpp
  143. dialogs/dialog_edit_library_tables.cpp
  144. dialogs/dialog_global_lib_table_config.cpp
  145. dialogs/dialog_global_lib_table_config_base.cpp
  146. dialogs/dialog_grid_settings.cpp
  147. dialogs/dialog_grid_settings_base.cpp
  148. dialogs/dialog_hotkey_list.cpp
  149. dialogs/dialog_HTML_reporter_base.cpp
  150. dialogs/dialog_image_editor.cpp
  151. dialogs/dialog_image_editor_base.cpp
  152. dialogs/dialog_migrate_settings.cpp
  153. dialogs/dialog_migrate_settings_base.cpp
  154. dialogs/dialog_page_settings_base.cpp
  155. dialogs/dialog_text_entry_base.cpp
  156. dialogs/dialog_print_generic.cpp
  157. dialogs/dialog_print_generic_base.cpp
  158. dialogs/dialog_text_entry.cpp
  159. dialogs/eda_list_dialog.cpp
  160. dialogs/eda_list_dialog_base.cpp
  161. dialogs/eda_view_switcher.cpp
  162. dialogs/eda_view_switcher_base.cpp
  163. dialogs/panel_color_settings_base.cpp
  164. dialogs/panel_color_settings.cpp
  165. dialogs/panel_common_settings.cpp
  166. dialogs/panel_common_settings_base.cpp
  167. dialogs/panel_hotkeys_editor.cpp
  168. dialogs/panel_mouse_settings.cpp
  169. dialogs/panel_mouse_settings_base.cpp
  170. dialogs/panel_setup_netclasses.cpp
  171. dialogs/panel_setup_netclasses_base.cpp
  172. dialogs/panel_setup_severities.cpp
  173. dialogs/panel_text_variables.cpp
  174. dialogs/panel_text_variables_base.cpp
  175. dialogs/wx_html_report_box.cpp
  176. dialogs/wx_html_report_panel.cpp
  177. dialogs/wx_html_report_panel_base.cpp
  178. )
  179. set( COMMON_WIDGET_SRCS
  180. widgets/app_progress_dialog.cpp
  181. widgets/bitmap_button.cpp
  182. widgets/bitmap_toggle.cpp
  183. widgets/button_row_panel.cpp
  184. widgets/collapsible_pane.cpp
  185. widgets/color_swatch.cpp
  186. widgets/footprint_choice.cpp
  187. widgets/footprint_preview_widget.cpp
  188. widgets/footprint_select_widget.cpp
  189. widgets/gal_options_panel.cpp
  190. widgets/grid_bitmap_toggle.cpp
  191. widgets/grid_color_swatch_helpers.cpp
  192. widgets/grid_combobox.cpp
  193. widgets/grid_icon_text_helpers.cpp
  194. widgets/grid_text_button_helpers.cpp
  195. widgets/grid_text_helpers.cpp
  196. widgets/indicator_icon.cpp
  197. widgets/infobar.cpp
  198. widgets/layer_box_selector.cpp
  199. widgets/lib_tree.cpp
  200. widgets/mathplot.cpp
  201. widgets/paged_dialog.cpp
  202. widgets/progress_reporter.cpp
  203. widgets/split_button.cpp
  204. widgets/stepped_slider.cpp
  205. widgets/text_ctrl_eval.cpp
  206. widgets/ui_common.cpp
  207. widgets/unit_binder.cpp
  208. widgets/widget_save_restore.cpp
  209. widgets/widget_hotkey_list.cpp
  210. widgets/wx_busy_indicator.cpp
  211. widgets/wx_grid.cpp
  212. widgets/wx_angle_text.cpp
  213. )
  214. set( COMMON_PAGE_LAYOUT_SRCS
  215. page_layout/ws_data_item.cpp
  216. page_layout/ws_data_model.cpp
  217. page_layout/ws_data_model_io.cpp
  218. page_layout/page_layout_default_description.cpp
  219. page_layout/ws_draw_item.cpp
  220. page_layout/ws_proxy_undo_item.cpp
  221. page_layout/ws_proxy_view_item.cpp
  222. page_layout/page_layout_reader.cpp
  223. )
  224. set( COMMON_PREVIEW_ITEMS_SRCS
  225. preview_items/arc_assistant.cpp
  226. preview_items/arc_geom_manager.cpp
  227. preview_items/bright_box.cpp
  228. preview_items/centreline_rect_item.cpp
  229. preview_items/draw_context.cpp
  230. preview_items/polygon_geom_manager.cpp
  231. preview_items/polygon_item.cpp
  232. preview_items/preview_utils.cpp
  233. preview_items/ruler_item.cpp
  234. preview_items/selection_area.cpp
  235. preview_items/simple_overlay_item.cpp
  236. preview_items/two_point_assistant.cpp
  237. )
  238. set( PLOTTERS_CONTROL_SRCS
  239. plotters/plotter.cpp
  240. plotters/DXF_plotter.cpp
  241. plotters/GERBER_plotter.cpp
  242. plotters/HPGL_plotter.cpp
  243. plotters/PDF_plotter.cpp
  244. plotters/PS_plotter.cpp
  245. plotters/SVG_plotter.cpp
  246. plotters/common_plot_functions.cpp
  247. )
  248. set( PLUGINS_ALTIUM_SRCS
  249. plugins/altium/altium_parser.cpp
  250. )
  251. set( PLUGINS_CADSTAR_SRCS
  252. plugins/cadstar/cadstar_archive_parser.cpp
  253. )
  254. set( COMMON_SRCS
  255. ${LIB_KICAD_SRCS}
  256. ${COMMON_ABOUT_DLG_SRCS}
  257. ${COMMON_DLG_SRCS}
  258. ${COMMON_WIDGET_SRCS}
  259. ${COMMON_PAGE_LAYOUT_SRCS}
  260. ${COMMON_PREVIEW_ITEMS_SRCS}
  261. ${PLOTTERS_CONTROL_SRCS}
  262. ${PLUGINS_ALTIUM_SRCS}
  263. ${PLUGINS_CADSTAR_SRCS}
  264. advanced_config.cpp
  265. array_axis.cpp
  266. array_options.cpp
  267. base64.cpp
  268. base_struct.cpp
  269. bin_mod.cpp
  270. bitmap.cpp
  271. bitmap_base.cpp
  272. board_printout.cpp
  273. build_version.cpp
  274. commit.cpp
  275. common.cpp
  276. config_params.cpp
  277. confirm.cpp
  278. cursor_store.cpp
  279. dialog_shim.cpp
  280. gr_text.cpp
  281. dsnlexer.cpp
  282. eagle_parser.cpp
  283. eda_base_frame.cpp
  284. eda_dde.cpp
  285. eda_doc.cpp
  286. eda_draw_frame.cpp
  287. eda_pattern_match.cpp
  288. eda_size_ctrl.cpp
  289. env_paths.cpp
  290. env_vars.cpp
  291. exceptions.cpp
  292. executable_names.cpp
  293. filename_resolver.cpp
  294. filehistory.cpp
  295. filter_reader.cpp
  296. footprint_filter.cpp
  297. footprint_info.cpp
  298. gbr_metadata.cpp
  299. gestfich.cpp
  300. getrunningmicrosecs.cpp
  301. gr_basic.cpp
  302. grid_tricks.cpp
  303. hotkey_store.cpp
  304. hotkeys_basic.cpp
  305. html_messagebox.cpp
  306. kiface_i.cpp
  307. kiway.cpp
  308. kiway_express.cpp
  309. kiway_holder.cpp
  310. kiway_player.cpp
  311. languages_menu.cpp
  312. launch_ext.cpp
  313. layer_id.cpp
  314. lib_id.cpp
  315. lib_table_base.cpp
  316. lib_tree_model.cpp
  317. lib_tree_model_adapter.cpp
  318. lockfile.cpp
  319. lset.cpp
  320. marker_base.cpp
  321. msgpanel.cpp
  322. netclass.cpp
  323. observable.cpp
  324. origin_transforms.cpp
  325. prependpath.cpp
  326. printout.cpp
  327. project.cpp
  328. properties.cpp
  329. property_mgr.cpp
  330. ptree.cpp
  331. rc_item.cpp
  332. refdes_utils.cpp
  333. render_settings.cpp
  334. reporter.cpp
  335. richio.cpp
  336. scintilla_tricks.cpp
  337. search_stack.cpp
  338. searchhelpfilefullpath.cpp
  339. status_popup.cpp
  340. systemdirsappend.cpp
  341. template_fieldnames.cpp
  342. textentry_tricks.cpp
  343. title_block.cpp
  344. trace_helpers.cpp
  345. undo_redo_container.cpp
  346. utf8.cpp
  347. validators.cpp
  348. wildcards_and_files_ext.cpp
  349. page_layout/ws_painter.cpp
  350. wxdataviewctrl_helpers.cpp
  351. xnode.cpp
  352. )
  353. if( TRUE OR NOT USE_KIWAY_DLLS )
  354. #if( NOT USE_KIWAY_DLLS )
  355. # We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY.
  356. # Check the map files to verify eda_pgm.o not being linked in.
  357. list( APPEND COMMON_SRCS pgm_base.cpp )
  358. endif()
  359. if( NOT HAVE_STRTOKR )
  360. list( APPEND COMMON_SRCS strtok_r.c )
  361. endif()
  362. list( APPEND COMMON_SRCS
  363. kicad_curl/kicad_curl.cpp
  364. kicad_curl/kicad_curl_easy.cpp
  365. )
  366. set( COMMON_SRCS
  367. ${COMMON_SRCS}
  368. origin_viewitem.cpp
  369. view/view.cpp
  370. view/view_item.cpp
  371. view/view_group.cpp
  372. tool/action_manager.cpp
  373. tool/action_menu.cpp
  374. tool/action_toolbar.cpp
  375. tool/actions.cpp
  376. tool/common_control.cpp
  377. tool/common_tools.cpp
  378. tool/conditional_menu.cpp
  379. tool/edit_constraints.cpp
  380. tool/edit_points.cpp
  381. tool/editor_conditions.cpp
  382. tool/grid_menu.cpp
  383. tool/picker_tool.cpp
  384. tool/selection_conditions.cpp
  385. tool/tool_action.cpp
  386. tool/tool_base.cpp
  387. tool/tool_dispatcher.cpp
  388. tool/tool_event.cpp
  389. tool/tools_holder.cpp
  390. tool/tool_interactive.cpp
  391. tool/tool_manager.cpp
  392. tool/tool_menu.cpp
  393. tool/zoom_menu.cpp
  394. tool/zoom_tool.cpp
  395. settings/app_settings.cpp
  396. settings/color_settings.cpp
  397. settings/common_settings.cpp
  398. settings/json_settings.cpp
  399. settings/nested_settings.cpp
  400. settings/settings_manager.cpp
  401. project/net_settings.cpp
  402. project/project_archiver.cpp
  403. project/project_file.cpp
  404. project/project_local_settings.cpp
  405. )
  406. add_library( common STATIC
  407. ${COMMON_SRCS}
  408. $<TARGET_OBJECTS:libcontext>
  409. )
  410. target_include_directories( common PRIVATE
  411. $<TARGET_PROPERTY:libcontext,INTERFACE_INCLUDE_DIRECTORIES>
  412. )
  413. add_dependencies( common libcontext )
  414. add_dependencies( common version_header )
  415. add_dependencies( common compoundfilereader ) # used by altium_parser.cpp
  416. target_link_libraries( common
  417. kimath
  418. kiplatform
  419. bitmaps
  420. gal
  421. ${Boost_LIBRARIES}
  422. ${CURL_LIBRARIES}
  423. ${OPENSSL_LIBRARIES} # empty on Apple
  424. ${wxWidgets_LIBRARIES}
  425. ${EXTRA_LIBS}
  426. )
  427. target_include_directories( common PUBLIC
  428. $<TARGET_PROPERTY:nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>
  429. )
  430. target_include_directories( common PUBLIC
  431. $<TARGET_PROPERTY:compoundfilereader,INTERFACE_INCLUDE_DIRECTORIES>
  432. ) # used by altium_parser.cpp
  433. set( PCB_COMMON_SRCS
  434. base_screen.cpp
  435. eda_text.cpp
  436. fp_lib_table.cpp
  437. hash_eda.cpp
  438. page_info.cpp
  439. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_base_frame.cpp
  440. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_expr_evaluator.cpp
  441. ${CMAKE_SOURCE_DIR}/pcbnew/board_commit.cpp
  442. ${CMAKE_SOURCE_DIR}/pcbnew/board_connected_item.cpp
  443. ${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp
  444. ${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.cpp
  445. ${CMAKE_SOURCE_DIR}/pcbnew/class_board.cpp
  446. ${CMAKE_SOURCE_DIR}/pcbnew/class_board_item.cpp
  447. ${CMAKE_SOURCE_DIR}/pcbnew/class_dimension.cpp
  448. ${CMAKE_SOURCE_DIR}/pcbnew/class_drawsegment.cpp
  449. ${CMAKE_SOURCE_DIR}/pcbnew/class_edge_mod.cpp
  450. ${CMAKE_SOURCE_DIR}/pcbnew/class_pcb_group.cpp
  451. ${CMAKE_SOURCE_DIR}/pcbnew/class_marker_pcb.cpp
  452. ${CMAKE_SOURCE_DIR}/pcbnew/class_module.cpp
  453. ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
  454. ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
  455. ${CMAKE_SOURCE_DIR}/pcbnew/class_pad.cpp
  456. ${CMAKE_SOURCE_DIR}/pcbnew/class_pcb_target.cpp
  457. ${CMAKE_SOURCE_DIR}/pcbnew/class_pcb_text.cpp
  458. ${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/class_board_stackup.cpp
  459. ${CMAKE_SOURCE_DIR}/pcbnew/class_text_mod.cpp
  460. ${CMAKE_SOURCE_DIR}/pcbnew/class_track.cpp
  461. ${CMAKE_SOURCE_DIR}/pcbnew/class_zone.cpp
  462. ${CMAKE_SOURCE_DIR}/pcbnew/collectors.cpp
  463. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_algo.cpp
  464. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_items.cpp
  465. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_data.cpp
  466. ${CMAKE_SOURCE_DIR}/pcbnew/convert_drawsegment_list_to_polygon.cpp
  467. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_engine.cpp
  468. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_item.cpp
  469. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule.cpp
  470. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule_condition.cpp
  471. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule_parser.cpp
  472. ${CMAKE_SOURCE_DIR}/pcbnew/eagle_plugin.cpp
  473. ${CMAKE_SOURCE_DIR}/pcbnew/footprint_editor_settings.cpp
  474. ${CMAKE_SOURCE_DIR}/pcbnew/gpcb_plugin.cpp
  475. ${CMAKE_SOURCE_DIR}/pcbnew/io_mgr.cpp
  476. ${CMAKE_SOURCE_DIR}/pcbnew/kicad_clipboard.cpp
  477. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/kicad_netlist_reader.cpp
  478. ${CMAKE_SOURCE_DIR}/pcbnew/kicad_plugin.cpp
  479. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/legacy_netlist_reader.cpp
  480. ${CMAKE_SOURCE_DIR}/pcbnew/legacy_plugin.cpp
  481. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/netlist_reader.cpp
  482. ${CMAKE_SOURCE_DIR}/pcbnew/pad_custom_shape_functions.cpp
  483. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_display_options.cpp
  484. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_draw_panel_gal.cpp
  485. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/pcb_netlist.cpp
  486. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_origin_transforms.cpp
  487. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_painter.cpp
  488. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_parser.cpp
  489. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_plot_params.cpp
  490. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_screen.cpp
  491. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_view.cpp
  492. ${CMAKE_SOURCE_DIR}/pcbnew/pcbnew_settings.cpp
  493. ${CMAKE_SOURCE_DIR}/pcbnew/plugin.cpp
  494. ${CMAKE_SOURCE_DIR}/pcbnew/ratsnest/ratsnest_data.cpp
  495. ${CMAKE_SOURCE_DIR}/pcbnew/ratsnest/ratsnest_viewitem.cpp
  496. ${CMAKE_SOURCE_DIR}/pcbnew/sel_layer.cpp
  497. ${CMAKE_SOURCE_DIR}/pcbnew/zone_settings.cpp
  498. ${CMAKE_SOURCE_DIR}/pcbnew/tools/grid_helper.cpp
  499. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_actions.cpp
  500. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_editor_conditions.cpp
  501. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_viewer_tools.cpp
  502. widgets/net_selector.cpp
  503. )
  504. # add -DPCBNEW to compilation of these PCBNEW sources
  505. set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
  506. COMPILE_DEFINITIONS "PCBNEW"
  507. )
  508. add_library( pcbcommon STATIC ${PCB_COMMON_SRCS} )
  509. target_include_directories( pcbcommon PUBLIC
  510. $<TARGET_PROPERTY:delaunator,INTERFACE_INCLUDE_DIRECTORIES>
  511. )
  512. target_link_libraries( pcbcommon PUBLIC
  513. common
  514. delaunator
  515. kimath
  516. kiplatform
  517. )
  518. add_dependencies( pcbcommon delaunator )
  519. # The lemon grammar for the numeric evaluator
  520. generate_lemon_grammar(
  521. common
  522. libeval
  523. libeval/numeric_evaluator.cpp
  524. libeval/grammar.lemon
  525. )
  526. # The lemon grammar for the expression compiler
  527. generate_lemon_grammar(
  528. common
  529. libeval_compiler
  530. libeval_compiler/libeval_compiler.cpp
  531. libeval_compiler/grammar.lemon
  532. )
  533. # auto-generate netlist_lexer.h and netlist_keywords.cpp
  534. make_lexer(
  535. common
  536. netlist.keywords
  537. netlist_lexer.h
  538. netlist_keywords.cpp
  539. NL_T
  540. )
  541. # auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp
  542. make_lexer(
  543. pcbcommon
  544. pcb_plot_params.keywords
  545. pcb_plot_params_lexer.h
  546. pcb_plot_params_keywords.cpp
  547. PCBPLOTPARAMS_T
  548. )
  549. # auto-generate drc_rules_lexer.h and drc_rules_keywords.cpp
  550. make_lexer(
  551. common
  552. drc_rules.keywords
  553. drc_rules_lexer.h
  554. drc_rules_keywords.cpp
  555. DRCRULE_T
  556. )
  557. # auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp
  558. make_lexer(
  559. pcbcommon
  560. pcb.keywords
  561. pcb_lexer.h
  562. pcb_keywords.cpp
  563. PCB_KEYS_T
  564. )
  565. # auto-generate s-expression library table code.
  566. make_lexer(
  567. common
  568. lib_table.keywords
  569. lib_table_lexer.h
  570. lib_table_keywords.cpp
  571. LIB_TABLE_T
  572. )
  573. # auto-generate s-expression template fieldnames lexer and keywords.
  574. make_lexer(
  575. common
  576. template_fieldnames.keywords
  577. template_fieldnames_lexer.h
  578. template_fieldnames_keywords.cpp
  579. TFIELD_T
  580. )
  581. # auto-generate page layout reader s-expression page_layout_reader_lexer.h
  582. # and title_block_reader_keywords.cpp.
  583. make_lexer(
  584. common
  585. page_layout/page_layout_reader.keywords
  586. page_layout/page_layout_reader_lexer.h
  587. page_layout/page_layout_reader_keywords.cpp
  588. TB_READER_T
  589. )
  590. # This one gets made only when testing.
  591. # to build it, first enable #define STAND_ALONE at top of dsnlexer.cpp
  592. add_executable( dsntest EXCLUDE_FROM_ALL dsnlexer.cpp )
  593. target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} rt )
  594. target_link_libraries( pcbcommon PUBLIC bitmaps )
  595. # _kiway.so
  596. if( false ) # future
  597. #if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  598. set( SWIG_FLAGS
  599. -I${CMAKE_CURRENT_SOURCE_DIR}/../include
  600. )
  601. if( DEBUG )
  602. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  603. endif()
  604. # call SWIG in C++ mode: https://cmake.org/cmake/help/v3.2/module/UseSWIG.html
  605. set_source_files_properties( swig/kiway.i PROPERTIES CPLUSPLUS ON )
  606. # collect CFLAGS , and pass them to swig later
  607. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  608. foreach( d ${DirDefs} )
  609. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  610. endforeach()
  611. set( CMAKE_SWIG_FLAGS ${SWIG_FLAGS} )
  612. include_directories( BEFORE ${INC_BEFORE} )
  613. include_directories(
  614. ${CMAKE_SOURCE_DIR}/common
  615. ${INC_AFTER}
  616. )
  617. set( SWIG_MODULE_kiway_EXTRA_DEPS
  618. ${CMAKE_SOURCE_DIR}/common/swig/ki_exception.i
  619. ${CMAKE_SOURCE_DIR}/common/swig/kicad.i
  620. )
  621. swig_add_module( kiway python
  622. swig/kiway.i
  623. )
  624. swig_link_libraries( kiway
  625. common
  626. ${wxWidgets_LIBRARIES}
  627. ${PYTHON_LIBRARIES}
  628. )
  629. set_source_files_properties( ${swig_generated_file_fullname} PROPERTIES
  630. # See section 16.3 "The SWIG runtime code"
  631. # http://www.swig.org/Doc3.0/SWIGDocumentation.html#Modules_nn2
  632. COMPILE_FLAGS "-DSWIG_TYPE_TABLE=WXPYTHON_TYPE_TABLE -Wno-delete-non-virtual-dtor"
  633. )
  634. if( MAKE_LINK_MAPS )
  635. set_target_properties( _kiway PROPERTIES
  636. LINK_FLAGS "-Wl,-cref,-Map=_kiway.so.map"
  637. )
  638. endif()
  639. endif()