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.

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