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.

865 lines
28 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
8 years ago
8 years ago
8 years ago
8 years ago
18 years ago
18 years ago
8 years ago
8 years ago
18 years ago
8 years ago
8 years ago
18 years ago
18 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
* 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
  1. if( UNIX AND NOT APPLE )
  2. # Setting this ON slows down linking and is a advanced (=hidden) developer option for
  3. # linux, not a user option.
  4. option( PCBNEW_LINK_MAPS
  5. "Developer: create linker map files for pcbnew binaries, not typical for Debug builds"
  6. )
  7. mark_as_advanced( PCBNEW_LINK_MAPS )
  8. endif()
  9. add_definitions( -DPCBNEW )
  10. add_subdirectory(connectivity)
  11. add_subdirectory(router)
  12. # psnrouter depends on make_lexer outputs in common (bug # 1285878 )
  13. add_dependencies( pnsrouter pcbcommon )
  14. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  15. file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swig )
  16. # Infrequently needed headers go at end of search paths, append to INC_AFTER
  17. set( INC_AFTER ${INC_AFTER} swig )
  18. set( INC_AFTER ${INC_AFTER} ../common/swig )
  19. #message( STATUS "pcbnew INC_AFTER:${INC_AFTER}" )
  20. endif()
  21. if( BUILD_GITHUB_PLUGIN )
  22. set( GITHUB_3DLIBRARIES_WIZARD
  23. dialogs/wizard_3DShape_Libs_downloader_base.cpp
  24. dialogs/wizard_3DShape_Libs_downloader.cpp
  25. )
  26. endif()
  27. include_directories( BEFORE ${INC_BEFORE} )
  28. include_directories(
  29. ../include/legacy_wx
  30. ./dialogs
  31. ./autorouter
  32. ../3d-viewer
  33. ../common
  34. ../common/dialogs
  35. ./exporters
  36. ../dxflib_qcad
  37. ../utils/idftools
  38. ${GLM_INCLUDE_DIR}
  39. ./specctra_import_export
  40. ${INC_AFTER}
  41. )
  42. set( PCBNEW_DIALOGS
  43. dialogs/dialog_block_options.cpp
  44. dialogs/dialog_block_options_base.cpp
  45. dialogs/dialog_board_setup.cpp
  46. dialogs/dialog_choose_footprint.cpp
  47. dialogs/dialog_cleanup_tracks_and_vias.cpp
  48. dialogs/dialog_cleanup_tracks_and_vias_base.cpp
  49. dialogs/dialog_copper_zones.cpp
  50. dialogs/dialog_copper_zones_base.cpp
  51. dialogs/dialog_create_array.cpp
  52. dialogs/dialog_create_array_base.cpp
  53. dialogs/dialog_drc.cpp
  54. dialogs/dialog_drc_base.cpp
  55. dialogs/dialog_edit_footprint_for_BoardEditor.cpp
  56. dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
  57. dialogs/dialog_edit_footprint_for_fp_editor.cpp
  58. dialogs/dialog_edit_footprint_for_fp_editor_base.cpp
  59. dialogs/dialog_enum_pads.cpp
  60. dialogs/dialog_enum_pads_base.cpp
  61. dialogs/dialog_exchange_footprints.cpp
  62. dialogs/dialog_exchange_footprints_base.cpp
  63. dialogs/dialog_export_idf.cpp
  64. dialogs/dialog_export_idf_base.cpp
  65. dialogs/dialog_export_step.cpp
  66. dialogs/dialog_export_step_base.cpp
  67. dialogs/dialog_export_svg.cpp
  68. dialogs/dialog_export_svg_base.cpp
  69. dialogs/dialog_export_vrml.cpp
  70. dialogs/dialog_export_vrml_base.cpp
  71. dialogs/dialog_find.cpp
  72. dialogs/dialog_find_base.cpp
  73. dialogs/dialog_footprint_wizard_list.cpp
  74. dialogs/dialog_footprint_wizard_list_base.cpp
  75. dialogs/dialog_fp_browser_display_options.cpp
  76. dialogs/dialog_fp_browser_display_options_base.cpp
  77. dialogs/dialog_fp_plugin_options.cpp
  78. dialogs/dialog_fp_plugin_options_base.cpp
  79. dialogs/dialog_gen_footprint_position_file_base.cpp
  80. dialogs/dialog_gencad_export_options.cpp
  81. dialogs/dialog_gendrill.cpp
  82. dialogs/dialog_gendrill_base.cpp
  83. dialogs/dialog_get_footprint_by_name_base.cpp
  84. dialogs/dialog_global_deletion.cpp
  85. dialogs/dialog_global_deletion_base.cpp
  86. dialogs/dialog_global_edit_tracks_and_vias.cpp
  87. dialogs/dialog_global_edit_tracks_and_vias_base.cpp
  88. dialogs/dialog_global_edit_text_and_graphics.cpp
  89. dialogs/dialog_global_edit_text_and_graphics_base.cpp
  90. dialogs/dialog_global_fp_lib_table_config.cpp
  91. dialogs/dialog_push_pad_properties.cpp
  92. dialogs/dialog_push_pad_properties_base.cpp
  93. dialogs/dialog_graphic_item_properties.cpp
  94. dialogs/dialog_graphic_item_properties_base.cpp
  95. dialogs/dialog_import_settings.cpp
  96. dialogs/dialog_import_settings_base.cpp
  97. dialogs/dialog_keepout_area_properties.cpp
  98. dialogs/dialog_keepout_area_properties_base.cpp
  99. dialogs/dialog_layer_selection_base.cpp
  100. dialogs/dialog_move_exact.cpp
  101. dialogs/dialog_move_exact_base.cpp
  102. dialogs/dialog_netlist.cpp
  103. dialogs/dialog_netlist_base.cpp
  104. dialogs/dialog_non_copper_zones_properties.cpp
  105. dialogs/dialog_non_copper_zones_properties_base.cpp
  106. dialogs/dialog_pad_basicshapes_properties.cpp
  107. dialogs/dialog_pad_properties.cpp
  108. dialogs/dialog_pad_properties_base.cpp
  109. dialogs/dialog_plot.cpp
  110. dialogs/dialog_plot_base.cpp
  111. dialogs/dialog_pns_diff_pair_dimensions.cpp
  112. dialogs/dialog_pns_diff_pair_dimensions_base.cpp
  113. dialogs/dialog_pns_length_tuning_settings.cpp
  114. dialogs/dialog_pns_length_tuning_settings_base.cpp
  115. dialogs/dialog_pns_settings.cpp
  116. dialogs/dialog_pns_settings_base.cpp
  117. dialogs/dialog_position_relative.cpp
  118. dialogs/dialog_position_relative_base.cpp
  119. dialogs/dialog_print_pcbnew.cpp
  120. dialogs/dialog_select_net_from_list.cpp
  121. dialogs/dialog_select_net_from_list_base.cpp
  122. dialogs/dialog_set_grid.cpp
  123. dialogs/dialog_set_grid_base.cpp
  124. dialogs/dialog_swap_layers.cpp
  125. dialogs/dialog_swap_layers_base.cpp
  126. dialogs/dialog_target_properties_base.cpp
  127. dialogs/dialog_text_properties.cpp
  128. dialogs/dialog_text_properties_base.cpp
  129. dialogs/dialog_track_via_properties.cpp
  130. dialogs/dialog_track_via_properties_base.cpp
  131. dialogs/dialog_track_via_size.cpp
  132. dialogs/dialog_track_via_size_base.cpp
  133. dialogs/dialog_update_pcb.cpp
  134. dialogs/dialog_update_pcb_base.cpp
  135. dialogs/panel_fp_lib_table.cpp
  136. dialogs/panel_fp_lib_table_base.cpp
  137. dialogs/panel_modedit_defaults.cpp
  138. dialogs/panel_modedit_defaults_base.cpp
  139. dialogs/panel_modedit_display_options.cpp
  140. dialogs/panel_modedit_settings.cpp
  141. dialogs/panel_modedit_settings_base.cpp
  142. dialogs/panel_pcbnew_display_options.cpp
  143. dialogs/panel_pcbnew_display_options_base.cpp
  144. dialogs/panel_pcbnew_settings.cpp
  145. dialogs/panel_pcbnew_settings_base.cpp
  146. dialogs/panel_setup_mask_and_paste.cpp
  147. dialogs/panel_setup_mask_and_paste_base.cpp
  148. dialogs/panel_setup_feature_constraints.cpp
  149. dialogs/panel_setup_feature_constraints_base.cpp
  150. dialogs/panel_setup_layers.cpp
  151. dialogs/panel_setup_layers_base.cpp
  152. dialogs/panel_setup_netclasses.cpp
  153. dialogs/panel_setup_netclasses_base.cpp
  154. dialogs/panel_setup_text_and_graphics.cpp
  155. dialogs/panel_setup_text_and_graphics_base.cpp
  156. dialogs/panel_setup_tracks_and_vias.cpp
  157. dialogs/panel_setup_tracks_and_vias_base.cpp
  158. footprint_wizard.cpp
  159. footprint_wizard_frame.cpp
  160. footprint_wizard_frame_functions.cpp
  161. ${GITHUB_3DLIBRARIES_WIZARD}
  162. )
  163. if( KICAD_SCRIPTING AND KICAD_SCRIPTING_ACTION_MENU )
  164. set( PCBNEW_DIALOGS ${PCBNEW_DIALOGS}
  165. dialogs/panel_pcbnew_action_plugins.cpp
  166. dialogs/panel_pcbnew_action_plugins_base.cpp
  167. )
  168. endif()
  169. set( PCBNEW_IMPORT_GFX
  170. import_gfx/dialog_import_gfx_base.cpp
  171. import_gfx/dialog_import_gfx.cpp
  172. import_gfx/graphics_import_mgr.cpp
  173. import_gfx/graphics_importer.cpp
  174. import_gfx/graphics_importer_pcbnew.cpp
  175. import_gfx/graphics_importer_buffer.cpp
  176. import_gfx/dxf_import_plugin.cpp
  177. import_gfx/svg_import_plugin.cpp
  178. import_gfx/nanosvg.cpp
  179. )
  180. set( PCBNEW_EXPORTERS
  181. exporters/export_hyperlynx.cpp
  182. exporters/export_d356.cpp
  183. exporters/export_footprint_associations.cpp
  184. exporters/export_gencad.cpp
  185. exporters/export_idf.cpp
  186. exporters/export_vrml.cpp
  187. exporters/gen_drill_report_files.cpp
  188. exporters/gen_footprints_placefile.cpp
  189. exporters/gendrill_Excellon_writer.cpp
  190. exporters/gendrill_file_writer_base.cpp
  191. exporters/gendrill_gerber_writer.cpp
  192. exporters/gerber_jobfile_writer.cpp
  193. )
  194. set( PCBNEW_MICROWAVE_SRCS
  195. microwave/microwave_inductor.cpp
  196. )
  197. set( PCBNEW_DRC_SRCS
  198. drc/courtyard_overlap.cpp
  199. drc/drc_marker_factory.cpp
  200. drc/drc_provider.cpp
  201. )
  202. set( PCBNEW_CLASS_SRCS
  203. ${PCBNEW_DIALOGS}
  204. ${PCBNEW_EXPORTERS}
  205. ${PCBNEW_IMPORT_GFX}
  206. ${PCBNEW_DRC_SRCS}
  207. autorouter/rect_placement/rect_placement.cpp
  208. autorouter/spread_footprints.cpp
  209. autorouter/ar_autoplacer.cpp
  210. autorouter/ar_matrix.cpp
  211. autorouter/autoplacer_tool.cpp
  212. action_plugin.cpp
  213. append_board_to_current.cpp
  214. array_creator.cpp
  215. array_pad_name_provider.cpp
  216. attribut.cpp
  217. block.cpp
  218. block_footprint_editor.cpp
  219. board_netlist_updater.cpp
  220. build_BOM_from_board.cpp
  221. connect.cpp
  222. controle.cpp
  223. cross-probing.cpp
  224. deltrack.cpp
  225. dimension.cpp
  226. dragsegm.cpp
  227. drc.cpp
  228. drc_clearance_test_functions.cpp
  229. edgemod.cpp
  230. edit.cpp
  231. edit_pcb_text.cpp
  232. edit_track_width.cpp
  233. editedge.cpp
  234. editrack-part2.cpp
  235. editrack.cpp
  236. edtxtmod.cpp
  237. event_handlers_tracks_vias_sizes.cpp
  238. files.cpp
  239. footprint_info_impl.cpp
  240. footprint_wizard.cpp
  241. footprint_editor_utils.cpp
  242. footprint_editor_onclick.cpp
  243. footprint_editor_options.cpp
  244. fp_tree_synchronizing_adapter.cpp
  245. footprint_edit_frame.cpp
  246. footprint_libraries_utils.cpp
  247. footprint_viewer_frame.cpp
  248. fp_tree_model_adapter.cpp
  249. generate_footprint_info.cpp
  250. grid_layer_box_helpers.cpp
  251. grid_layer_box_helpers.h
  252. highlight.cpp
  253. hotkeys.cpp
  254. hotkeys_board_editor.cpp
  255. hotkeys_footprint_editor.cpp
  256. initpcb.cpp
  257. layer_widget.cpp
  258. load_select_footprint.cpp
  259. magnetic_tracks_functions.cpp
  260. menubar_footprint_editor.cpp
  261. menubar_pcb_editor.cpp
  262. microwave.cpp
  263. minimun_spanning_tree.cpp
  264. move-drag_pads.cpp
  265. move_or_drag_track.cpp
  266. muwave_command.cpp
  267. netlist.cpp
  268. onleftclick.cpp
  269. onrightclick.cpp
  270. pad_edit_functions.cpp
  271. pad_naming.cpp
  272. pcb_base_edit_frame.cpp
  273. pcb_footprint_edit_utils.cpp
  274. pcb_layer_box_selector.cpp
  275. pcb_layer_widget.cpp
  276. # pcb_draw_panel_gal.cpp
  277. # pcb_view.cpp
  278. pcb_edit_frame.cpp
  279. pcbnew_config.cpp
  280. pcbnew_printout.cpp
  281. pcb_legacy_draw_utils.cpp
  282. pcbplot.cpp
  283. plot_board_layers.cpp
  284. plot_brditems_plotter.cpp
  285. ratsnest.cpp
  286. specctra_import_export/specctra.cpp
  287. specctra_import_export/specctra_export.cpp
  288. specctra_import_export/specctra_import.cpp
  289. specctra_import_export/specctra_keywords.cpp
  290. target_edit.cpp
  291. text_mod_grid_table.cpp
  292. toolbars_footprint_editor.cpp
  293. toolbars_footprint_viewer.cpp
  294. toolbar_onrightclick.cpp
  295. toolbars_pcb_editor.cpp
  296. toolbars_update_user_interface.cpp
  297. tracks_cleaner.cpp
  298. undo_redo.cpp
  299. zone_filler.cpp
  300. zones_by_polygon.cpp
  301. zones_by_polygon_fill_functions.cpp
  302. zones_functions_for_undo_redo.cpp
  303. zones_test_and_combine_areas.cpp
  304. tools/drawing_tool.cpp
  305. tools/edit_constraints.cpp
  306. tools/edit_points.cpp
  307. tools/edit_tool.cpp
  308. tools/grid_helper.cpp
  309. tools/microwave_tool.cpp
  310. tools/footprint_editor_tools.cpp
  311. tools/pad_tool.cpp
  312. tools/pcb_actions.cpp
  313. tools/pcb_bright_box.cpp
  314. tools/pcb_editor_control.cpp
  315. tools/pcb_selection_conditions.cpp
  316. tools/pcb_tool.cpp
  317. tools/pcbnew_control.cpp
  318. tools/picker_tool.cpp
  319. tools/placement_tool.cpp
  320. tools/point_editor.cpp
  321. tools/position_relative_tool.cpp
  322. tools/selection.cpp
  323. tools/selection_tool.cpp
  324. tools/tool_event_utils.cpp
  325. tools/zone_create_helper.cpp
  326. tools/zone_filler_tool.cpp
  327. footprint_preview_panel.cpp
  328. footprint_tree_pane.cpp
  329. )
  330. set( PCBNEW_SRCS
  331. ${PCBNEW_MICROWAVE_SRCS}
  332. ${PCBNEW_CLASS_SRCS}
  333. ${PCBNEW_DIALOGS}
  334. )
  335. # extra sources from common
  336. set( PCBNEW_COMMON_SRCS
  337. ../common/dialogs/dialog_page_settings.cpp
  338. ../common/base_units.cpp
  339. )
  340. set( PCBNEW_SCRIPTING_DIALOGS
  341. dialogs/dialog_scripting.cpp
  342. dialogs/dialog_scripting_base.cpp
  343. )
  344. set( PCBNEW_SCRIPTING_PYTHON_HELPERS
  345. ../common/swig/wx_python_helpers.cpp
  346. swig/pcbnew_action_plugins.cpp
  347. swig/pcbnew_footprint_wizards.cpp
  348. swig/pcbnew_scripting_helpers.cpp
  349. swig/python_scripting.cpp
  350. )
  351. # auto-generate specctra_lexer.h and specctra_keywords.cpp
  352. make_lexer(
  353. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra.keywords
  354. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  355. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  356. DSN
  357. # Pass header file with dependency on *_lexer.h as extra_arg
  358. specctra_import_export/specctra.h
  359. )
  360. add_custom_target(
  361. specctra_lexer_source_files ALL
  362. DEPENDS
  363. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  364. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  365. )
  366. if( COMPILER_SUPPORTS_WSHADOW )
  367. # .cpp files are compiled with extra ${WSHADOW_FLAGS}, but not .cxx files
  368. set_source_files_properties(
  369. ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_DIALOGS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  370. PROPERTIES COMPILE_FLAGS ${WSHADOW_FLAGS}
  371. )
  372. # There is a lot of 'local variable shadowed' warnings,
  373. # but we have no control over the generated code
  374. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  375. PROPERTIES COMPILE_FLAGS -Wno-shadow
  376. )
  377. endif()
  378. if( KICAD_SCRIPTING )
  379. set( PCBNEW_SCRIPTING_SRCS
  380. ${PCBNEW_SCRIPTING_DIALOGS}
  381. pcbnew_wrap.cxx
  382. ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  383. )
  384. # Swig generated files do not use the override specifier, therefore
  385. # disable suggest-override warnings
  386. if( COMPILER_SUPPORTS_WSUGGEST_OVERRIDE )
  387. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  388. PROPERTIES COMPILE_FLAGS -Wno-suggest-override
  389. )
  390. endif()
  391. endif()
  392. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  393. set( SWIG_FLAGS
  394. -I${CMAKE_CURRENT_SOURCE_DIR}
  395. -I${CMAKE_CURRENT_SOURCE_DIR}/../include
  396. -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting
  397. -I${CMAKE_CURRENT_SOURCE_DIR}/../common/swig
  398. -I${WXPYTHON_SWIG_DIR}
  399. )
  400. if( DEBUG )
  401. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  402. endif()
  403. # collect CFLAGS , and pass them to swig later
  404. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  405. foreach( d ${DirDefs} )
  406. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  407. endforeach()
  408. endif()
  409. if( KICAD_SCRIPTING ) # Generate pcbnew.py and pcbnew_wrap.cxx using swig
  410. # We deliberately do not use the CMake support for swig here,
  411. # i.e. swig_add_footprint()) because we want full control.
  412. set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
  413. if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
  414. set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
  415. set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
  416. endif()
  417. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
  418. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  419. DEPENDS pcbcommon
  420. DEPENDS plotcontroller.h
  421. DEPENDS exporters/gendrill_Excellon_writer.h
  422. DEPENDS swig/pcbnew.i
  423. DEPENDS swig/board.i
  424. DEPENDS swig/board_connected_item.i
  425. DEPENDS swig/board_design_settings.i
  426. DEPENDS swig/board_item.i
  427. DEPENDS swig/board_item_container.i
  428. DEPENDS swig/connectivity.i
  429. DEPENDS swig/dimension.i
  430. DEPENDS swig/drawsegment.i
  431. DEPENDS swig/edge_mod.i
  432. DEPENDS swig/marker_pcb.i
  433. DEPENDS swig/pcb_target.i
  434. DEPENDS swig/pcb_plot_params.i
  435. DEPENDS swig/footprint.i
  436. DEPENDS swig/netclass.i
  437. DEPENDS swig/netinfo.i
  438. DEPENDS swig/pad.i
  439. DEPENDS swig/pcb_text.i
  440. DEPENDS swig/plugins.i
  441. DEPENDS swig/text_mod.i
  442. DEPENDS swig/track.i
  443. DEPENDS swig/units.i
  444. DEPENDS swig/typeinfo.i
  445. DEPENDS swig/zone.i
  446. DEPENDS swig/zone_settings.i
  447. DEPENDS ../common/swig/dlist.i
  448. DEPENDS ../common/swig/kicad.i
  449. DEPENDS ../common/swig/wx.i
  450. DEPENDS ../common/swig/ki_exception.i
  451. DEPENDS ../scripting/kicadplugins.i
  452. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
  453. # Make docstrings.i available if it doesn't exist
  454. COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i
  455. COMMAND ${SWIG_EXECUTABLE}
  456. ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx swig/pcbnew.i
  457. COMMAND ${PYTHON_EXECUTABLE}
  458. ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py
  459. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  460. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  461. )
  462. endif()
  463. if( BUILD_GITHUB_PLUGIN )
  464. set( GITHUB_PLUGIN_LIBRARIES github_plugin )
  465. endif()
  466. if( UNIX AND NOT APPLE )
  467. list( APPEND PCBNEW_EXTRA_LIBS rt )
  468. endif()
  469. ###
  470. # Doxygen python documentation
  471. ###
  472. if( DOXYGEN_FOUND )
  473. if( KICAD_SCRIPTING )
  474. # create XML files from doxygen parsing
  475. add_custom_target( doxygen-python-xml
  476. ${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
  477. COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
  478. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  479. DEPENDS Doxyfile_xml
  480. COMMENT "building doxygen docs into directory doxygen-python/html"
  481. )
  482. # create .i files from XML doxygen parsing, docstrings.i will include all of them
  483. add_custom_target( xml-to-docstrings
  484. COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
  485. COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
  486. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
  487. COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
  488. COMMENT "building docstring files"
  489. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  490. DEPENDS pcbnew.py
  491. DEPENDS doxygen-python-xml
  492. )
  493. # The sources to give to the Python Doxygen target
  494. set( DOXYGEN_PYTHON_SOURCES
  495. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  496. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/FootprintWizardBase.py
  497. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/PadArray.py )
  498. # The Doxyfile expects a space-separated list in the env var
  499. string(REPLACE ";" " " DOXYGEN_PYTHON_SOURCES_STR "${DOXYGEN_PYTHON_SOURCES}")
  500. # Create doxygen-python html
  501. add_custom_target( doxygen-python
  502. ${CMAKE_COMMAND} -E remove_directory doxygen-python
  503. COMMAND ${CMAKE_COMMAND} -E env
  504. PYTHON_SOURCES_TO_DOC=${DOXYGEN_PYTHON_SOURCES_STR}
  505. CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
  506. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
  507. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  508. DEPENDS Doxyfile_python
  509. DEPENDS xml-to-docstrings
  510. DEPENDS ${DOXYGEN_PYTHON_SOURCES}
  511. COMMENT "building doxygen docs into directory doxygen-python/html"
  512. )
  513. endif()
  514. endif()
  515. if( MINGW )
  516. # PCBNEW_RESOURCES variable is set by the macro.
  517. mingw_resource_compiler( pcbnew )
  518. else()
  519. set( PCBNEW_RESOURCES pcbnew.rc )
  520. endif()
  521. if( APPLE )
  522. # setup bundle
  523. set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
  524. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
  525. MACOSX_PACKAGE_LOCATION Resources
  526. )
  527. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
  528. MACOSX_PACKAGE_LOCATION Resources
  529. )
  530. set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
  531. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
  532. set( MACOSX_BUNDLE_NAME pcbnew )
  533. endif()
  534. add_subdirectory( pcad2kicadpcb_plugin )
  535. if( BUILD_GITHUB_PLUGIN )
  536. add_subdirectory( github )
  537. # github_plugin depends on make_lexer outputs in common
  538. add_dependencies( github_plugin pcbcommon )
  539. endif()
  540. # a very small program launcher for pcbnew_kiface
  541. add_executable( pcbnew WIN32 MACOSX_BUNDLE
  542. ../common/single_top.cpp
  543. ${PCBNEW_RESOURCES}
  544. )
  545. set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES
  546. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
  547. )
  548. target_link_libraries( pcbnew
  549. #singletop # replaces common, giving us restrictive control and link warnings.
  550. # There's way too much crap coming in from common yet.
  551. common
  552. gal
  553. ${wxWidgets_LIBRARIES}
  554. )
  555. if( PCBNEW_LINK_MAPS )
  556. set_target_properties( pcbnew PROPERTIES
  557. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map" )
  558. endif()
  559. # the main pcbnew program, in DSO form.
  560. add_library( pcbnew_kiface_objects OBJECT
  561. pcbnew.cpp
  562. ${PCBNEW_SRCS}
  563. ${PCBNEW_COMMON_SRCS}
  564. ${PCBNEW_SCRIPTING_SRCS}
  565. )
  566. # CMake <3.9 can't link anything to object libraries,
  567. # but we only need include directories, as we will link the kiface MODULE
  568. target_include_directories( pcbnew_kiface_objects PRIVATE
  569. $<TARGET_PROPERTY:common,INCLUDE_DIRECTORIES>
  570. )
  571. add_library( pcbnew_kiface MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  572. set_target_properties( pcbnew_kiface PROPERTIES
  573. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  574. # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
  575. OUTPUT_NAME pcbnew
  576. PREFIX ${KIFACE_PREFIX}
  577. SUFFIX ${KIFACE_SUFFIX}
  578. )
  579. if ( KICAD_BUILD_TESTS )
  580. if ( UNIX )
  581. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  582. COMMAND ln -sf _pcbnew.kiface lib_pcbnew_kiface.so )
  583. else()
  584. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  585. COMMAND copy _pcbnew.kiface lib_pcbnew_kiface.dll )
  586. endif()
  587. endif ()
  588. set( PCBNEW_KIFACE_LIBRARIES
  589. 3d-viewer
  590. connectivity
  591. pcbcommon
  592. pnsrouter
  593. pcad2kicadpcb
  594. legacy_wx
  595. common
  596. gal
  597. lib_dxf
  598. idf3
  599. ${wxWidgets_LIBRARIES}
  600. ${GITHUB_PLUGIN_LIBRARIES}
  601. ${GDI_PLUS_LIBRARIES}
  602. ${PYTHON_LIBRARIES}
  603. ${Boost_LIBRARIES} # must follow GITHUB
  604. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  605. )
  606. target_link_libraries( pcbnew_kiface ${PCBNEW_KIFACE_LIBRARIES} )
  607. set_source_files_properties( pcbnew.cpp PROPERTIES
  608. # The KIFACE is in pcbnew.cpp, export it:
  609. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  610. )
  611. if( PCBNEW_LINK_MAPS )
  612. set_target_properties( pcbnew_kiface PROPERTIES
  613. LINK_FLAGS "-Wl,-cref,-Map=_pcbnew.kiface.map"
  614. )
  615. set_target_properties( pcbnew PROPERTIES
  616. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map"
  617. )
  618. endif()
  619. # if building pcbnew, then also build pcbnew_kiface if out of date.
  620. add_dependencies( pcbnew pcbnew_kiface )
  621. # add dependency to specctra_lexer_source_files, to force
  622. # generation of autogenerated file
  623. add_dependencies( pcbnew_kiface_objects specctra_lexer_source_files )
  624. # these 2 binaries are a matched set, keep them together:
  625. if( APPLE )
  626. set_target_properties( pcbnew PROPERTIES
  627. MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
  628. )
  629. # puts binaries into the *.app bundle while linking
  630. set_target_properties( pcbnew_kiface PROPERTIES
  631. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  632. )
  633. # put individual bundle outside of main bundle as a first step
  634. # will be pulled into the main bundle when creating main bundle
  635. install( TARGETS pcbnew
  636. DESTINATION ${KICAD_BIN}
  637. COMPONENT binary
  638. )
  639. install( CODE "
  640. # override default embedded path settings
  641. ${OSX_BUNDLE_OVERRIDE_PATHS}
  642. # do all the work
  643. include( BundleUtilities )
  644. fixup_bundle( ${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew
  645. \"\"
  646. \"\"
  647. )
  648. " COMPONENT Runtime
  649. )
  650. else()
  651. install( TARGETS pcbnew
  652. DESTINATION ${KICAD_BIN}
  653. COMPONENT binary
  654. )
  655. install( TARGETS pcbnew_kiface
  656. DESTINATION ${KICAD_BIN}
  657. COMPONENT binary
  658. )
  659. endif()
  660. if( KICAD_SCRIPTING )
  661. if( NOT APPLE )
  662. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
  663. else()
  664. # put into bundle at build time, it is relocated at install
  665. add_custom_target( ScriptingPcbnewPyCopy ALL
  666. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
  667. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  668. COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
  669. )
  670. add_dependencies( ScriptingPcbnewPyCopy ScriptingWxpythonCopy )
  671. endif()
  672. # python plugins
  673. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
  674. DESTINATION ${KICAD_DATA}/scripting/plugins
  675. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  676. )
  677. # python shell
  678. if ( KICAD_SCRIPTING_WXPYTHON )
  679. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/kicad_pyshell/
  680. DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell
  681. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  682. )
  683. endif()
  684. endif()
  685. if( KICAD_SCRIPTING_MODULES )
  686. # 1) KICAD_SCRIPTING enables python inside _pcbnew.kiface.
  687. # 2) KICAD_SCRIPTING_MODULES enables python from the OS command line for pcbnew.
  688. # When python is running within _pcbnew.kiface (case 1 above) it uses said
  689. # kiface for the native part of the pcbnew python module. This is a kind of
  690. # circular dependency that works well. When running python from
  691. # the command line (case 2 above) then python needs a native portion of the pcbnew
  692. # python module also, and this is _pcbnew.{so,pyd}. It turns out that the
  693. # kiface file is built adequately to serve the needs of 2) for now if it is
  694. # merely renamed. This is phase 1 of a 2 step plan.
  695. # In phase 2 we will use the _pcbnew.kiface file without renaming, by doctoring
  696. # what the python portion of the pcbnew python module wants to load when run
  697. # from the command line, case 2 above.
  698. # Here is built the _pcbnew.{so,pyd} which is the native part of the pcbnew Python library
  699. # when Python is used from the command line.
  700. if( MINGW )
  701. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
  702. set( PYMOD_EXT "pyd" )
  703. elseif( APPLE )
  704. # put everything into bundle at build time, it is relocated at install
  705. add_custom_target( ScriptingModulesPcbnewSoCopy ALL
  706. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
  707. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
  708. COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
  709. )
  710. add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
  711. set( PYMOD_EXT "so" )
  712. else() # only linux remains among supported platforms
  713. add_library( pcbnew_python MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  714. target_link_libraries( pcbnew_python ${PCBNEW_KIFACE_LIBRARIES} )
  715. set_target_properties( pcbnew_python PROPERTIES OUTPUT_NAME pcbnew PREFIX "_" SUFFIX ".so" )
  716. install( TARGETS pcbnew_python DESTINATION ${PYTHON_DEST} COMPONENT binary )
  717. set( PYMOD_EXT "so" )
  718. endif()
  719. if( APPLE )
  720. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  721. DEPENDS pcbnew_kiface
  722. COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
  723. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  724. )
  725. add_custom_target(
  726. pcbnew_python_module ALL
  727. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  728. )
  729. else()
  730. # For phase 1, copy _pcbnew.kiface to the python module.
  731. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  732. DEPENDS pcbnew_kiface
  733. COMMAND ${CMAKE_COMMAND} -E copy _pcbnew.kiface _pcbnew.${PYMOD_EXT}
  734. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  735. )
  736. add_custom_target(
  737. pcbnew_python_module ALL
  738. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  739. )
  740. endif()
  741. endif()
  742. if( APPLE )
  743. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  744. # find wx-X.Y-osx_cocoa path below PYTHON_SITE_PACKAGE_PATH
  745. file( GLOB WXPYTHON_DIR RELATIVE ${PYTHON_SITE_PACKAGE_PATH} ${PYTHON_SITE_PACKAGE_PATH}/wx-?.?-osx_cocoa )
  746. if( NOT WXPYTHON_DIR )
  747. message( FATAL_ERROR "Could not find 'wx-?.?-osx_cocoa' in '${PYTHON_SITE_PACKAGE_PATH}'" )
  748. endif()
  749. # copy contents
  750. add_custom_target( ScriptingWxpythonCopy ALL
  751. COMMAND ${CMAKE_COMMAND} -E copy_directory "${PYTHON_SITE_PACKAGE_PATH}/${WXPYTHON_DIR}" "${PYTHON_DEST}/${WXPYTHON_DIR}"
  752. COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_SITE_PACKAGE_PATH}/wxversion.py" "${PYTHON_DEST}"
  753. COMMENT "Copying wxPython into ${PYTHON_DEST}"
  754. )
  755. endif()
  756. endif()