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.

673 lines
19 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
* 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}/bitmaps_png
  15. ${CMAKE_SOURCE_DIR}/3d-viewer
  16. ${CMAKE_SOURCE_DIR}/pcbnew
  17. ${INC_AFTER}
  18. )
  19. # Get the GAL Target
  20. add_subdirectory( gal )
  21. # Only for win32 cross compilation using MXE
  22. if( WIN32 AND MSYS )
  23. add_definitions( -DGLEW_STATIC )
  24. endif()
  25. # A shared library subsetted from common which restricts what can go into
  26. # a single_top link image. By not linking to common, we control what does
  27. # statically go into single_top link images. My current thinking is that only
  28. # wxWidgets should be a shared link from single top, everything else should be
  29. # statically bound into it. Otherwise you will have DSO loading probs. After it
  30. # sets the LIB PATHS however, we want the *.kiface modules to use shared linking.
  31. add_library( singletop STATIC EXCLUDE_FROM_ALL
  32. confirm.cpp
  33. eda_doc.cpp
  34. kiway.cpp
  35. kiway_holder.cpp
  36. )
  37. # A shared library used by multiple *.kiface files and one or two program
  38. # launchers. Object files can migrate into here over time, but only if they are
  39. # surely needed and certainly used from more than one place without recompilation.
  40. # Functions and data all need to use the #include <import_export.h> and be declared
  41. # as APIEXPORT
  42. set( LIB_KICAD_SRCS
  43. string_utils.cpp
  44. )
  45. if( future )
  46. add_library( lib_kicad SHARED
  47. )
  48. target_link_libraries( lib_kicad
  49. ${wxWidgets_LIBRARIES}
  50. )
  51. set_target_properties( lib_kicad PROPERTIES
  52. OUTPUT_NAME ki
  53. )
  54. install( TARGETS lib_kicad
  55. DESTINATION ${KICAD_BIN}
  56. COMPONENT binary
  57. )
  58. endif()
  59. # The build version string defaults to the value in the KiCadVersion.cmake file.
  60. # If being built inside a git repository, the git tag and commit hash are used to create
  61. # a new version string instead. The user can supply an additional string to be appended
  62. # to the end inside the KICAD_VERSION_EXTRA variable
  63. set( KICAD_VERSION_EXTRA "" CACHE STRING
  64. "User defined configuration string to append to KiCad version." )
  65. # Generate version header file.
  66. add_custom_target(
  67. version_header ALL
  68. COMMAND ${CMAKE_COMMAND}
  69. -DKICAD_VERSION_EXTRA=${KICAD_VERSION_EXTRA}
  70. -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h
  71. -DTEXT_OUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.txt
  72. -DSRC_PATH=${PROJECT_SOURCE_DIR}
  73. -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
  74. -P ${CMAKE_MODULE_PATH}/BuildSteps/WriteVersionHeader.cmake
  75. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
  76. BYPRODUCTS ${CMAKE_BINARY_DIR}/kicad_build_version.h
  77. DEPENDS ${CMAKE_MODULE_PATH}/BuildSteps/WriteVersionHeader.cmake
  78. COMMENT "Generating version string header"
  79. )
  80. set( COMMON_ABOUT_DLG_SRCS
  81. dialog_about/AboutDialog_main.cpp
  82. dialog_about/dialog_about.cpp
  83. dialog_about/dialog_about_base.cpp
  84. )
  85. set( COMMON_DLG_SRCS
  86. dialogs/dialog_color_picker.cpp
  87. dialogs/dialog_color_picker_base.cpp
  88. dialogs/dialog_configure_paths.cpp
  89. dialogs/dialog_configure_paths_base.cpp
  90. dialogs/dialog_display_html_text_base.cpp
  91. dialogs/dialog_edit_library_tables.cpp
  92. dialogs/dialog_global_lib_table_config.cpp
  93. dialogs/dialog_global_lib_table_config_base.cpp
  94. dialogs/dialog_grid_settings.cpp
  95. dialogs/dialog_grid_settings_base.cpp
  96. dialogs/dialog_hotkey_list.cpp
  97. dialogs/dialog_HTML_reporter_base.cpp
  98. dialogs/dialog_image_editor.cpp
  99. dialogs/dialog_image_editor_base.cpp
  100. dialogs/dialog_locked_items_query.cpp
  101. dialogs/dialog_locked_items_query_base.cpp
  102. dialogs/dialog_migrate_settings.cpp
  103. dialogs/dialog_migrate_settings_base.cpp
  104. dialogs/dialog_page_settings_base.cpp
  105. dialogs/dialog_paste_special.cpp
  106. dialogs/dialog_paste_special_base.cpp
  107. dialogs/dialog_text_entry_base.cpp
  108. dialogs/dialog_page_settings.cpp
  109. dialogs/dialog_print_generic.cpp
  110. dialogs/dialog_print_generic_base.cpp
  111. dialogs/dialog_text_entry.cpp
  112. dialogs/dialog_unit_entry.cpp
  113. dialogs/dialog_unit_entry_base.cpp
  114. dialogs/eda_list_dialog.cpp
  115. dialogs/eda_list_dialog_base.cpp
  116. dialogs/eda_view_switcher.cpp
  117. dialogs/eda_view_switcher_base.cpp
  118. dialogs/html_message_box.cpp
  119. dialogs/panel_color_settings_base.cpp
  120. dialogs/panel_color_settings.cpp
  121. dialogs/panel_common_settings.cpp
  122. dialogs/panel_common_settings_base.cpp
  123. dialogs/panel_hotkeys_editor.cpp
  124. dialogs/panel_mouse_settings.cpp
  125. dialogs/panel_mouse_settings_base.cpp
  126. dialogs/panel_setup_netclasses.cpp
  127. dialogs/panel_setup_netclasses_base.cpp
  128. dialogs/panel_setup_severities.cpp
  129. dialogs/panel_text_variables.cpp
  130. dialogs/panel_text_variables_base.cpp
  131. dialogs/wx_html_report_box.cpp
  132. dialogs/wx_html_report_panel.cpp
  133. dialogs/wx_html_report_panel_base.cpp
  134. )
  135. if( KICAD_USE_SENTRY )
  136. list( APPEND COMMON_DLG_SRCS
  137. dialogs/panel_data_collection.cpp
  138. dialogs/panel_data_collection_base.cpp )
  139. endif()
  140. set( COMMON_WIDGET_SRCS
  141. widgets/app_progress_dialog.cpp
  142. widgets/bitmap_button.cpp
  143. widgets/bitmap_toggle.cpp
  144. widgets/button_row_panel.cpp
  145. widgets/collapsible_pane.cpp
  146. widgets/color_swatch.cpp
  147. widgets/font_choice.cpp
  148. widgets/footprint_choice.cpp
  149. widgets/footprint_preview_widget.cpp
  150. widgets/footprint_select_widget.cpp
  151. widgets/gal_options_panel.cpp
  152. widgets/grid_bitmap_toggle.cpp
  153. widgets/grid_color_swatch_helpers.cpp
  154. widgets/grid_combobox.cpp
  155. widgets/grid_icon_text_helpers.cpp
  156. widgets/grid_text_button_helpers.cpp
  157. widgets/grid_text_helpers.cpp
  158. widgets/indicator_icon.cpp
  159. widgets/infobar.cpp
  160. widgets/layer_box_selector.cpp
  161. widgets/lib_tree.cpp
  162. widgets/mathplot.cpp
  163. widgets/msgpanel.cpp
  164. widgets/number_badge.cpp
  165. widgets/paged_dialog.cpp
  166. widgets/progress_reporter_base.cpp
  167. widgets/split_button.cpp
  168. widgets/stepped_slider.cpp
  169. widgets/text_ctrl_eval.cpp
  170. widgets/ui_common.cpp
  171. widgets/unit_binder.cpp
  172. widgets/widget_save_restore.cpp
  173. widgets/widget_hotkey_list.cpp
  174. widgets/wx_aui_art_providers.cpp
  175. widgets/wx_aui_utils.cpp
  176. widgets/wx_busy_indicator.cpp
  177. widgets/wx_ellipsized_static_text.cpp
  178. widgets/wx_grid.cpp
  179. widgets/wx_panel.cpp
  180. widgets/wx_progress_reporters.cpp
  181. widgets/wx_splitter_window.cpp
  182. )
  183. set( COMMON_DRAWING_SHEET_SRCS
  184. drawing_sheet/ds_data_item.cpp
  185. drawing_sheet/ds_data_model.cpp
  186. drawing_sheet/ds_data_model_io.cpp
  187. drawing_sheet/drawing_sheet_default_description.cpp
  188. drawing_sheet/ds_draw_item.cpp
  189. drawing_sheet/ds_proxy_undo_item.cpp
  190. drawing_sheet/ds_proxy_view_item.cpp
  191. drawing_sheet/drawing_sheet_parser.cpp
  192. )
  193. set( COMMON_PREVIEW_ITEMS_SRCS
  194. preview_items/arc_assistant.cpp
  195. preview_items/arc_geom_manager.cpp
  196. preview_items/centreline_rect_item.cpp
  197. preview_items/draw_context.cpp
  198. preview_items/polygon_geom_manager.cpp
  199. preview_items/polygon_item.cpp
  200. preview_items/preview_utils.cpp
  201. preview_items/ruler_item.cpp
  202. preview_items/selection_area.cpp
  203. preview_items/simple_overlay_item.cpp
  204. preview_items/two_point_assistant.cpp
  205. )
  206. set( PLOTTERS_CONTROL_SRCS
  207. plotters/plotter.cpp
  208. plotters/DXF_plotter.cpp
  209. plotters/GERBER_plotter.cpp
  210. plotters/HPGL_plotter.cpp
  211. plotters/PDF_plotter.cpp
  212. plotters/PS_plotter.cpp
  213. plotters/SVG_plotter.cpp
  214. plotters/common_plot_functions.cpp
  215. )
  216. set( PLUGINS_ALTIUM_SRCS
  217. plugins/altium/altium_parser.cpp
  218. plugins/altium/altium_parser_utils.cpp
  219. )
  220. set( PLUGINS_CADSTAR_SRCS
  221. plugins/cadstar/cadstar_archive_parser.cpp
  222. )
  223. set( PLUGINS_EAGLE_SRCS
  224. plugins/eagle/eagle_parser.cpp
  225. )
  226. set( FONT_SRCS
  227. font/font.cpp
  228. font/glyph.cpp
  229. font/stroke_font.cpp
  230. font/outline_font.cpp
  231. font/outline_decomposer.cpp
  232. font/fontconfig.cpp
  233. )
  234. set( COMMON_SRCS
  235. ${LIB_KICAD_SRCS}
  236. ${COMMON_ABOUT_DLG_SRCS}
  237. ${COMMON_DLG_SRCS}
  238. ${COMMON_WIDGET_SRCS}
  239. ${COMMON_DRAWING_SHEET_SRCS}
  240. ${COMMON_PREVIEW_ITEMS_SRCS}
  241. ${PLOTTERS_CONTROL_SRCS}
  242. ${PLUGINS_ALTIUM_SRCS}
  243. ${PLUGINS_CADSTAR_SRCS}
  244. ${PLUGINS_EAGLE_SRCS}
  245. ${FONT_SRCS}
  246. advanced_config.cpp
  247. array_axis.cpp
  248. array_options.cpp
  249. asset_archive.cpp
  250. base64.cpp
  251. bin_mod.cpp
  252. bitmap.cpp
  253. bitmap_base.cpp
  254. bitmap_store.cpp
  255. board_printout.cpp
  256. build_version.cpp
  257. commit.cpp
  258. common.cpp
  259. config_params.cpp
  260. confirm.cpp
  261. dialog_shim.cpp
  262. gr_text.cpp
  263. dsnlexer.cpp
  264. eda_base_frame.cpp
  265. eda_dde.cpp
  266. eda_doc.cpp
  267. eda_draw_frame.cpp
  268. eda_item.cpp
  269. eda_pattern_match.cpp
  270. eda_rect.cpp
  271. eda_units.cpp
  272. env_paths.cpp
  273. env_vars.cpp
  274. exceptions.cpp
  275. executable_names.cpp
  276. filename_resolver.cpp
  277. filehistory.cpp
  278. filter_reader.cpp
  279. footprint_filter.cpp
  280. footprint_info.cpp
  281. gbr_metadata.cpp
  282. gestfich.cpp
  283. getrunningmicrosecs.cpp
  284. gr_basic.cpp
  285. grid_tricks.cpp
  286. hotkey_store.cpp
  287. hotkeys_basic.cpp
  288. html_window.cpp
  289. kiface_base.cpp
  290. kiid.cpp
  291. kiway.cpp
  292. kiway_express.cpp
  293. kiway_holder.cpp
  294. kiway_player.cpp
  295. languages_menu.cpp
  296. launch_ext.cpp
  297. layer_id.cpp
  298. lib_id.cpp
  299. lib_table_base.cpp
  300. lib_tree_model.cpp
  301. lib_tree_model_adapter.cpp
  302. locale_io.cpp
  303. lockfile.cpp
  304. lset.cpp
  305. marker_base.cpp
  306. markup_parser.cpp
  307. netclass.cpp
  308. observable.cpp
  309. origin_transforms.cpp
  310. paths.cpp
  311. printout.cpp
  312. project.cpp
  313. properties.cpp
  314. property_mgr.cpp
  315. ptree.cpp
  316. rc_item.cpp
  317. refdes_utils.cpp
  318. render_settings.cpp
  319. reporter.cpp
  320. richio.cpp
  321. scintilla_tricks.cpp
  322. search_stack.cpp
  323. searchhelpfilefullpath.cpp
  324. status_popup.cpp
  325. stroke_params.cpp
  326. systemdirsappend.cpp
  327. template_fieldnames.cpp
  328. textentry_tricks.cpp
  329. title_block.cpp
  330. trace_helpers.cpp
  331. undo_redo_container.cpp
  332. utf8.cpp
  333. validators.cpp
  334. wildcards_and_files_ext.cpp
  335. drawing_sheet/ds_painter.cpp
  336. wxdataviewctrl_helpers.cpp
  337. wx_stl_compat.cpp
  338. wx_filename.cpp
  339. xnode.cpp
  340. )
  341. if( TRUE OR NOT USE_KIWAY_DLLS )
  342. #if( NOT USE_KIWAY_DLLS )
  343. # We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY.
  344. # Check the map files to verify eda_pgm.o not being linked in.
  345. list( APPEND COMMON_SRCS pgm_base.cpp )
  346. endif()
  347. if( NOT HAVE_STRTOKR )
  348. list( APPEND COMMON_SRCS strtok_r.c )
  349. endif()
  350. list( APPEND COMMON_SRCS
  351. kicad_curl/kicad_curl.cpp
  352. kicad_curl/kicad_curl_easy.cpp
  353. )
  354. set( COMMON_SRCS
  355. ${COMMON_SRCS}
  356. origin_viewitem.cpp
  357. view/view.cpp
  358. view/view_item.cpp
  359. view/view_group.cpp
  360. tool/action_manager.cpp
  361. tool/action_menu.cpp
  362. tool/action_toolbar.cpp
  363. tool/actions.cpp
  364. tool/common_control.cpp
  365. tool/common_tools.cpp
  366. tool/conditional_menu.cpp
  367. tool/edit_constraints.cpp
  368. tool/edit_points.cpp
  369. tool/editor_conditions.cpp
  370. tool/grid_helper.cpp
  371. tool/grid_menu.cpp
  372. tool/picker_tool.cpp
  373. tool/selection.cpp
  374. tool/selection_tool.cpp
  375. tool/selection_conditions.cpp
  376. tool/tool_action.cpp
  377. tool/tool_base.cpp
  378. tool/tool_dispatcher.cpp
  379. tool/tool_event.cpp
  380. tool/tools_holder.cpp
  381. tool/tool_interactive.cpp
  382. tool/tool_manager.cpp
  383. tool/tool_menu.cpp
  384. tool/zoom_menu.cpp
  385. tool/zoom_tool.cpp
  386. settings/app_settings.cpp
  387. settings/color_settings.cpp
  388. settings/common_settings.cpp
  389. settings/json_settings.cpp
  390. settings/nested_settings.cpp
  391. settings/parameters.cpp
  392. settings/settings_manager.cpp
  393. project/board_project_settings.cpp
  394. project/net_settings.cpp
  395. project/project_archiver.cpp
  396. project/project_file.cpp
  397. project/project_local_settings.cpp
  398. )
  399. add_library( common STATIC
  400. ${COMMON_SRCS}
  401. )
  402. add_dependencies( common version_header )
  403. add_dependencies( common compoundfilereader ) # used by altium_parser.cpp
  404. target_link_libraries( common
  405. libcontext
  406. kimath
  407. kiplatform
  408. gal
  409. scripting
  410. pybind11::embed
  411. compoundfilereader
  412. ${Boost_LIBRARIES}
  413. ${CURL_LIBRARIES}
  414. ${wxWidgets_LIBRARIES}
  415. ${EXTRA_LIBS}
  416. # outline font support
  417. ${FREETYPE_LIBRARIES}
  418. ${HarfBuzz_LIBRARIES}
  419. ${Fontconfig_LIBRARIES}
  420. )
  421. if( KICAD_USE_SENTRY )
  422. target_link_libraries( common
  423. sentry )
  424. endif()
  425. target_include_directories( common
  426. PUBLIC
  427. .
  428. ${CMAKE_BINARY_DIR}
  429. )
  430. # text markup support
  431. add_dependencies( common pegtl )
  432. target_include_directories( common PUBLIC
  433. $<TARGET_PROPERTY:pegtl,INTERFACE_INCLUDE_DIRECTORIES>
  434. )
  435. set( PCB_COMMON_SRCS
  436. base_screen.cpp
  437. eda_text.cpp
  438. eda_shape.cpp
  439. fp_lib_table.cpp
  440. hash_eda.cpp
  441. page_info.cpp
  442. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_base_frame.cpp
  443. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_expr_evaluator.cpp
  444. ${CMAKE_SOURCE_DIR}/pcbnew/board_commit.cpp
  445. ${CMAKE_SOURCE_DIR}/pcbnew/board_connected_item.cpp
  446. ${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp
  447. ${CMAKE_SOURCE_DIR}/pcbnew/teardrop/teardrop_parameters.cpp #needed by board_design_settings.cpp
  448. ${CMAKE_SOURCE_DIR}/pcbnew/board.cpp
  449. ${CMAKE_SOURCE_DIR}/pcbnew/board_item.cpp
  450. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_dimension.cpp
  451. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp
  452. ${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.cpp
  453. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_group.cpp
  454. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_marker.cpp
  455. ${CMAKE_SOURCE_DIR}/pcbnew/footprint.cpp
  456. ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
  457. ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
  458. ${CMAKE_SOURCE_DIR}/pcbnew/pad.cpp
  459. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_target.cpp
  460. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_text.cpp
  461. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_textbox.cpp
  462. ${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/board_stackup.cpp
  463. ${CMAKE_SOURCE_DIR}/pcbnew/fp_text.cpp
  464. ${CMAKE_SOURCE_DIR}/pcbnew/fp_textbox.cpp
  465. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_track.cpp
  466. ${CMAKE_SOURCE_DIR}/pcbnew/zone.cpp
  467. ${CMAKE_SOURCE_DIR}/pcbnew/collectors.cpp
  468. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_algo.cpp
  469. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_items.cpp
  470. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/connectivity_data.cpp
  471. ${CMAKE_SOURCE_DIR}/pcbnew/connectivity/from_to_cache.cpp
  472. ${CMAKE_SOURCE_DIR}/pcbnew/convert_shape_list_to_polygon.cpp
  473. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_engine.cpp
  474. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_item.cpp
  475. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule.cpp
  476. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule_condition.cpp
  477. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_rule_parser.cpp
  478. ${CMAKE_SOURCE_DIR}/pcbnew/drc/drc_test_provider.cpp
  479. ${CMAKE_SOURCE_DIR}/pcbnew/plugins/eagle/eagle_plugin.cpp
  480. ${CMAKE_SOURCE_DIR}/pcbnew/footprint_editor_settings.cpp
  481. ${CMAKE_SOURCE_DIR}/pcbnew/plugins/geda/gpcb_plugin.cpp
  482. ${CMAKE_SOURCE_DIR}/pcbnew/io_mgr.cpp
  483. ${CMAKE_SOURCE_DIR}/pcbnew/kicad_clipboard.cpp
  484. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/kicad_netlist_reader.cpp
  485. ${CMAKE_SOURCE_DIR}/pcbnew/plugins/kicad/pcb_plugin.cpp
  486. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/legacy_netlist_reader.cpp
  487. ${CMAKE_SOURCE_DIR}/pcbnew/plugins/legacy/legacy_plugin.cpp
  488. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/netlist_reader.cpp
  489. ${CMAKE_SOURCE_DIR}/pcbnew/pad_custom_shape_functions.cpp
  490. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_draw_panel_gal.cpp
  491. ${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/pcb_netlist.cpp
  492. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_origin_transforms.cpp
  493. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_painter.cpp
  494. ${CMAKE_SOURCE_DIR}/pcbnew/plugins/kicad/pcb_parser.cpp
  495. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_plot_params.cpp
  496. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_screen.cpp
  497. ${CMAKE_SOURCE_DIR}/pcbnew/pcb_view.cpp
  498. ${CMAKE_SOURCE_DIR}/pcbnew/pcbnew_settings.cpp
  499. ${CMAKE_SOURCE_DIR}/pcbnew/plugin.cpp
  500. ${CMAKE_SOURCE_DIR}/pcbnew/ratsnest/ratsnest_data.cpp
  501. ${CMAKE_SOURCE_DIR}/pcbnew/ratsnest/ratsnest_view_item.cpp
  502. ${CMAKE_SOURCE_DIR}/pcbnew/sel_layer.cpp
  503. ${CMAKE_SOURCE_DIR}/pcbnew/zone_settings.cpp
  504. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_grid_helper.cpp
  505. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_actions.cpp
  506. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_editor_conditions.cpp
  507. ${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_viewer_tools.cpp
  508. widgets/net_selector.cpp
  509. )
  510. # add -DPCBNEW to compilation of these PCBNEW sources
  511. set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
  512. COMPILE_DEFINITIONS "PCBNEW"
  513. )
  514. add_library( pcbcommon STATIC ${PCB_COMMON_SRCS} )
  515. target_link_libraries( pcbcommon PUBLIC
  516. common
  517. delaunator
  518. kimath
  519. kiplatform
  520. )
  521. if( KICAD_USE_3DCONNEXION )
  522. message( STATUS "Including 3Dconnexion SpaceMouse navigation support in pcbcommon" )
  523. add_subdirectory( ../pcbnew/navlib ./navlib)
  524. target_link_libraries( pcbcommon PUBLIC pcbnew_navlib)
  525. endif()
  526. add_dependencies( pcbcommon delaunator )
  527. # The lemon grammar for the numeric evaluator
  528. generate_lemon_grammar(
  529. common
  530. libeval
  531. libeval/numeric_evaluator.cpp
  532. libeval/grammar.lemon
  533. )
  534. # The lemon grammar for the expression compiler
  535. generate_lemon_grammar(
  536. common
  537. libeval_compiler
  538. libeval_compiler/libeval_compiler.cpp
  539. libeval_compiler/grammar.lemon
  540. )
  541. # auto-generate stroke_params_lexer.h and stroke_params_keywords.cpp
  542. # Called twice one for common and one for gal, to ensure the files are created
  543. # on all devel tools ( Linux and msys2 )
  544. # works on Linux:
  545. make_lexer(
  546. common
  547. stroke_params.keywords
  548. stroke_params_lexer.h
  549. stroke_params_keywords.cpp
  550. STROKEPARAMS_T
  551. )
  552. # auto-generate netlist_lexer.h and netlist_keywords.cpp
  553. make_lexer(
  554. common
  555. netlist.keywords
  556. netlist_lexer.h
  557. netlist_keywords.cpp
  558. NL_T
  559. )
  560. # auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp
  561. make_lexer(
  562. pcbcommon
  563. pcb_plot_params.keywords
  564. pcb_plot_params_lexer.h
  565. pcb_plot_params_keywords.cpp
  566. PCBPLOTPARAMS_T
  567. )
  568. # auto-generate drc_rules_lexer.h and drc_rules_keywords.cpp
  569. make_lexer(
  570. common
  571. drc_rules.keywords
  572. drc_rules_lexer.h
  573. drc_rules_keywords.cpp
  574. DRCRULE_T
  575. )
  576. # auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp
  577. make_lexer(
  578. pcbcommon
  579. pcb.keywords
  580. pcb_lexer.h
  581. pcb_keywords.cpp
  582. PCB_KEYS_T
  583. )
  584. # auto-generate s-expression library table code.
  585. make_lexer(
  586. common
  587. lib_table.keywords
  588. lib_table_lexer.h
  589. lib_table_keywords.cpp
  590. LIB_TABLE_T
  591. )
  592. # auto-generate s-expression template fieldnames lexer and keywords.
  593. make_lexer(
  594. common
  595. template_fieldnames.keywords
  596. template_fieldnames_lexer.h
  597. template_fieldnames_keywords.cpp
  598. TFIELD_T
  599. )
  600. # auto-generate page layout reader s-expression page_layout_reader_lexer.h
  601. # and title_block_reader_keywords.cpp.
  602. make_lexer(
  603. common
  604. drawing_sheet/drawing_sheet.keywords
  605. drawing_sheet/drawing_sheet_lexer.h
  606. drawing_sheet/drawing_sheet_keywords.cpp
  607. DRAWINGSHEET_T
  608. )
  609. # This one gets made only when testing.
  610. # to build it, first enable #define STAND_ALONE at top of dsnlexer.cpp
  611. add_executable( dsntest EXCLUDE_FROM_ALL dsnlexer.cpp )
  612. target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} rt )