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.

844 lines
28 KiB

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
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. array_creator.cpp
  214. array_pad_name_provider.cpp
  215. board_netlist_updater.cpp
  216. build_BOM_from_board.cpp
  217. connect.cpp
  218. cross-probing.cpp
  219. deltrack.cpp
  220. dimension.cpp
  221. dragsegm.cpp
  222. drc.cpp
  223. drc_clearance_test_functions.cpp
  224. edit.cpp
  225. edit_track_width.cpp
  226. editrack-part2.cpp
  227. editrack.cpp
  228. event_handlers_tracks_vias_sizes.cpp
  229. files.cpp
  230. footprint_info_impl.cpp
  231. footprint_wizard.cpp
  232. footprint_editor_utils.cpp
  233. footprint_editor_options.cpp
  234. fp_tree_synchronizing_adapter.cpp
  235. footprint_edit_frame.cpp
  236. footprint_libraries_utils.cpp
  237. footprint_viewer_frame.cpp
  238. fp_tree_model_adapter.cpp
  239. generate_footprint_info.cpp
  240. grid_layer_box_helpers.cpp
  241. grid_layer_box_helpers.h
  242. hotkeys.cpp
  243. initpcb.cpp
  244. layer_widget.cpp
  245. load_select_footprint.cpp
  246. magnetic_tracks_functions.cpp
  247. menubar_footprint_editor.cpp
  248. menubar_pcb_editor.cpp
  249. microwave.cpp
  250. minimun_spanning_tree.cpp
  251. netlist.cpp
  252. pad_edit_functions.cpp
  253. pad_naming.cpp
  254. pcb_base_edit_frame.cpp
  255. pcb_footprint_edit_utils.cpp
  256. pcb_layer_box_selector.cpp
  257. pcb_layer_widget.cpp
  258. # pcb_draw_panel_gal.cpp
  259. # pcb_view.cpp
  260. pcb_edit_frame.cpp
  261. pcbnew_config.cpp
  262. pcbnew_printout.cpp
  263. pcb_legacy_draw_utils.cpp
  264. pcbplot.cpp
  265. plot_board_layers.cpp
  266. plot_brditems_plotter.cpp
  267. ratsnest.cpp
  268. specctra_import_export/specctra.cpp
  269. specctra_import_export/specctra_export.cpp
  270. specctra_import_export/specctra_import.cpp
  271. specctra_import_export/specctra_keywords.cpp
  272. target_edit.cpp
  273. text_mod_grid_table.cpp
  274. toolbars_footprint_editor.cpp
  275. toolbars_footprint_viewer.cpp
  276. toolbar_onrightclick.cpp
  277. toolbars_pcb_editor.cpp
  278. tracks_cleaner.cpp
  279. undo_redo.cpp
  280. zone_filler.cpp
  281. zones_by_polygon.cpp
  282. zones_by_polygon_fill_functions.cpp
  283. zones_functions_for_undo_redo.cpp
  284. zones_test_and_combine_areas.cpp
  285. tools/drawing_tool.cpp
  286. tools/edit_tool.cpp
  287. tools/grid_helper.cpp
  288. tools/microwave_tool.cpp
  289. tools/footprint_editor_tools.cpp
  290. tools/pad_tool.cpp
  291. tools/pcb_actions.cpp
  292. tools/pcb_bright_box.cpp
  293. tools/pcb_editor_control.cpp
  294. tools/pcb_selection_conditions.cpp
  295. tools/pcb_tool_base.cpp
  296. tools/pcbnew_control.cpp
  297. tools/pcbnew_picker_tool.cpp
  298. tools/placement_tool.cpp
  299. tools/point_editor.cpp
  300. tools/position_relative_tool.cpp
  301. tools/selection.cpp
  302. tools/selection_tool.cpp
  303. tools/tool_event_utils.cpp
  304. tools/zone_create_helper.cpp
  305. tools/zone_filler_tool.cpp
  306. footprint_preview_panel.cpp
  307. footprint_tree_pane.cpp
  308. )
  309. set( PCBNEW_SRCS
  310. ${PCBNEW_MICROWAVE_SRCS}
  311. ${PCBNEW_CLASS_SRCS}
  312. ${PCBNEW_DIALOGS}
  313. )
  314. # extra sources from common
  315. set( PCBNEW_COMMON_SRCS
  316. ../common/dialogs/dialog_page_settings.cpp
  317. ../common/base_units.cpp
  318. )
  319. set( PCBNEW_SCRIPTING_DIALOGS
  320. dialogs/dialog_scripting.cpp
  321. dialogs/dialog_scripting_base.cpp
  322. )
  323. set( PCBNEW_SCRIPTING_PYTHON_HELPERS
  324. ../common/swig/wx_python_helpers.cpp
  325. swig/pcbnew_action_plugins.cpp
  326. swig/pcbnew_footprint_wizards.cpp
  327. swig/pcbnew_scripting_helpers.cpp
  328. swig/python_scripting.cpp
  329. )
  330. # auto-generate specctra_lexer.h and specctra_keywords.cpp
  331. make_lexer(
  332. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra.keywords
  333. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  334. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  335. DSN
  336. # Pass header file with dependency on *_lexer.h as extra_arg
  337. specctra_import_export/specctra.h
  338. )
  339. add_custom_target(
  340. specctra_lexer_source_files ALL
  341. DEPENDS
  342. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_lexer.h
  343. ${CMAKE_CURRENT_SOURCE_DIR}/specctra_import_export/specctra_keywords.cpp
  344. )
  345. if( COMPILER_SUPPORTS_WSHADOW )
  346. # .cpp files are compiled with extra ${WSHADOW_FLAGS}, but not .cxx files
  347. set_source_files_properties(
  348. ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_DIALOGS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  349. PROPERTIES COMPILE_FLAGS ${WSHADOW_FLAGS}
  350. )
  351. # There is a lot of 'local variable shadowed' warnings,
  352. # but we have no control over the generated code
  353. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  354. PROPERTIES COMPILE_FLAGS -Wno-shadow
  355. )
  356. endif()
  357. if( KICAD_SCRIPTING )
  358. set( PCBNEW_SCRIPTING_SRCS
  359. ${PCBNEW_SCRIPTING_DIALOGS}
  360. pcbnew_wrap.cxx
  361. ${PCBNEW_SCRIPTING_PYTHON_HELPERS}
  362. )
  363. # Swig generated files do not use the override specifier, therefore
  364. # disable suggest-override warnings
  365. if( COMPILER_SUPPORTS_WSUGGEST_OVERRIDE )
  366. set_source_files_properties( pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
  367. PROPERTIES COMPILE_FLAGS -Wno-suggest-override
  368. )
  369. endif()
  370. endif()
  371. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  372. set( SWIG_FLAGS
  373. -I${CMAKE_CURRENT_SOURCE_DIR}
  374. -I${CMAKE_CURRENT_SOURCE_DIR}/../include
  375. -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting
  376. -I${CMAKE_CURRENT_SOURCE_DIR}/../common/swig
  377. -I${WXPYTHON_SWIG_DIR}
  378. )
  379. if( DEBUG )
  380. set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG )
  381. endif()
  382. # collect CFLAGS , and pass them to swig later
  383. get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS )
  384. foreach( d ${DirDefs} )
  385. set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} )
  386. endforeach()
  387. endif()
  388. if( KICAD_SCRIPTING ) # Generate pcbnew.py and pcbnew_wrap.cxx using swig
  389. # We deliberately do not use the CMake support for swig here,
  390. # i.e. swig_add_footprint()) because we want full control.
  391. set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} )
  392. if( EXISTS ${CMAKE_CURRENT_BINARY_DIR}/doxygen-xml )
  393. set( SWIG_OPTS ${SWIG_OPTS} -DENABLE_DOCSTRINGS_FROM_DOXYGEN )
  394. set( SWIG_OPTS ${SWIG_OPTS} -I${CMAKE_CURRENT_BINARY_DIR}/docstrings )
  395. endif()
  396. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx
  397. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  398. DEPENDS pcbcommon
  399. DEPENDS plotcontroller.h
  400. DEPENDS exporters/gendrill_Excellon_writer.h
  401. DEPENDS swig/pcbnew.i
  402. DEPENDS swig/board.i
  403. DEPENDS swig/board_connected_item.i
  404. DEPENDS swig/board_design_settings.i
  405. DEPENDS swig/board_item.i
  406. DEPENDS swig/board_item_container.i
  407. DEPENDS swig/connectivity.i
  408. DEPENDS swig/dimension.i
  409. DEPENDS swig/drawsegment.i
  410. DEPENDS swig/edge_mod.i
  411. DEPENDS swig/marker_pcb.i
  412. DEPENDS swig/pcb_target.i
  413. DEPENDS swig/pcb_plot_params.i
  414. DEPENDS swig/footprint.i
  415. DEPENDS swig/netclass.i
  416. DEPENDS swig/netinfo.i
  417. DEPENDS swig/pad.i
  418. DEPENDS swig/pcb_text.i
  419. DEPENDS swig/plugins.i
  420. DEPENDS swig/text_mod.i
  421. DEPENDS swig/track.i
  422. DEPENDS swig/units.i
  423. DEPENDS swig/typeinfo.i
  424. DEPENDS swig/zone.i
  425. DEPENDS swig/zone_settings.i
  426. DEPENDS ../common/swig/dlist.i
  427. DEPENDS ../common/swig/kicad.i
  428. DEPENDS ../common/swig/wx.i
  429. DEPENDS ../common/swig/ki_exception.i
  430. DEPENDS ../scripting/kicadplugins.i
  431. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docstrings
  432. # Make docstrings.i available if it doesn't exist
  433. COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/docstrings/docstrings.i
  434. COMMAND ${SWIG_EXECUTABLE}
  435. ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx swig/pcbnew.i
  436. COMMAND ${PYTHON_EXECUTABLE}
  437. ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py
  438. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  439. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  440. )
  441. endif()
  442. if( BUILD_GITHUB_PLUGIN )
  443. set( GITHUB_PLUGIN_LIBRARIES github_plugin )
  444. endif()
  445. if( UNIX AND NOT APPLE )
  446. list( APPEND PCBNEW_EXTRA_LIBS rt )
  447. endif()
  448. ###
  449. # Doxygen python documentation
  450. ###
  451. if( DOXYGEN_FOUND )
  452. if( KICAD_SCRIPTING )
  453. # create XML files from doxygen parsing
  454. add_custom_target( doxygen-python-xml
  455. ${CMAKE_COMMAND} -E remove_directory doxygen-python-xml
  456. COMMAND SOURCES_DIR=${CMAKE_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_xml
  457. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  458. DEPENDS Doxyfile_xml
  459. COMMENT "building doxygen docs into directory doxygen-python/html"
  460. )
  461. # create .i files from XML doxygen parsing, docstrings.i will include all of them
  462. add_custom_target( xml-to-docstrings
  463. COMMAND ${CMAKE_COMMAND} -E remove_directory docstrings
  464. COMMAND ${CMAKE_COMMAND} -E make_directory docstrings
  465. COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripting/build_tools/extract_docstrings.py pcbnew.py doxygen-xml/xml docstrings
  466. COMMAND ${CMAKE_COMMAND} -E remove pcbnew.py # force removal so it will be recreated later with the new docstrings
  467. COMMENT "building docstring files"
  468. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  469. DEPENDS pcbnew.py
  470. DEPENDS doxygen-python-xml
  471. )
  472. # The sources to give to the Python Doxygen target
  473. set( DOXYGEN_PYTHON_SOURCES
  474. ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  475. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/FootprintWizardBase.py
  476. ${CMAKE_CURRENT_SOURCE_DIR}/python/plugins/PadArray.py )
  477. # The Doxyfile expects a space-separated list in the env var
  478. string(REPLACE ";" " " DOXYGEN_PYTHON_SOURCES_STR "${DOXYGEN_PYTHON_SOURCES}")
  479. # Create doxygen-python html
  480. add_custom_target( doxygen-python
  481. ${CMAKE_COMMAND} -E remove_directory doxygen-python
  482. COMMAND ${CMAKE_COMMAND} -E env
  483. PYTHON_SOURCES_TO_DOC=${DOXYGEN_PYTHON_SOURCES_STR}
  484. CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
  485. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python
  486. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  487. DEPENDS Doxyfile_python
  488. DEPENDS xml-to-docstrings
  489. DEPENDS ${DOXYGEN_PYTHON_SOURCES}
  490. COMMENT "building doxygen docs into directory doxygen-python/html"
  491. )
  492. endif()
  493. endif()
  494. if( MINGW )
  495. # PCBNEW_RESOURCES variable is set by the macro.
  496. mingw_resource_compiler( pcbnew )
  497. else()
  498. set( PCBNEW_RESOURCES pcbnew.rc )
  499. endif()
  500. if( APPLE )
  501. # setup bundle
  502. set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
  503. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
  504. MACOSX_PACKAGE_LOCATION Resources
  505. )
  506. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
  507. MACOSX_PACKAGE_LOCATION Resources
  508. )
  509. set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
  510. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
  511. set( MACOSX_BUNDLE_NAME pcbnew )
  512. endif()
  513. add_subdirectory( pcad2kicadpcb_plugin )
  514. if( BUILD_GITHUB_PLUGIN )
  515. add_subdirectory( github )
  516. # github_plugin depends on make_lexer outputs in common
  517. add_dependencies( github_plugin pcbcommon )
  518. endif()
  519. # a very small program launcher for pcbnew_kiface
  520. add_executable( pcbnew WIN32 MACOSX_BUNDLE
  521. ../common/single_top.cpp
  522. ${PCBNEW_RESOURCES}
  523. )
  524. set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES
  525. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
  526. )
  527. target_link_libraries( pcbnew
  528. #singletop # replaces common, giving us restrictive control and link warnings.
  529. # There's way too much crap coming in from common yet.
  530. common
  531. gal
  532. ${wxWidgets_LIBRARIES}
  533. )
  534. if( PCBNEW_LINK_MAPS )
  535. set_target_properties( pcbnew PROPERTIES
  536. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map" )
  537. endif()
  538. # the main pcbnew program, in DSO form.
  539. add_library( pcbnew_kiface_objects OBJECT
  540. pcbnew.cpp
  541. ${PCBNEW_SRCS}
  542. ${PCBNEW_COMMON_SRCS}
  543. ${PCBNEW_SCRIPTING_SRCS}
  544. )
  545. # CMake <3.9 can't link anything to object libraries,
  546. # but we only need include directories, as we will link the kiface MODULE
  547. target_include_directories( pcbnew_kiface_objects PRIVATE
  548. $<TARGET_PROPERTY:common,INCLUDE_DIRECTORIES>
  549. )
  550. add_library( pcbnew_kiface MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  551. set_target_properties( pcbnew_kiface PROPERTIES
  552. # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
  553. # _pcbnew.so, _pcbnew.dll, or _pcbnew.kiface
  554. OUTPUT_NAME pcbnew
  555. PREFIX ${KIFACE_PREFIX}
  556. SUFFIX ${KIFACE_SUFFIX}
  557. )
  558. if ( KICAD_BUILD_TESTS )
  559. if ( UNIX )
  560. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  561. COMMAND ln -sf _pcbnew.kiface lib_pcbnew_kiface.so )
  562. else()
  563. add_custom_command(TARGET pcbnew_kiface POST_BUILD
  564. COMMAND copy _pcbnew.kiface lib_pcbnew_kiface.dll )
  565. endif()
  566. endif ()
  567. set( PCBNEW_KIFACE_LIBRARIES
  568. 3d-viewer
  569. connectivity
  570. pcbcommon
  571. pnsrouter
  572. pcad2kicadpcb
  573. legacy_wx
  574. common
  575. gal
  576. lib_dxf
  577. idf3
  578. ${wxWidgets_LIBRARIES}
  579. ${GITHUB_PLUGIN_LIBRARIES}
  580. ${GDI_PLUS_LIBRARIES}
  581. ${PYTHON_LIBRARIES}
  582. ${Boost_LIBRARIES} # must follow GITHUB
  583. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  584. )
  585. target_link_libraries( pcbnew_kiface ${PCBNEW_KIFACE_LIBRARIES} )
  586. set_source_files_properties( pcbnew.cpp PROPERTIES
  587. # The KIFACE is in pcbnew.cpp, export it:
  588. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  589. )
  590. if( PCBNEW_LINK_MAPS )
  591. set_target_properties( pcbnew_kiface PROPERTIES
  592. LINK_FLAGS "-Wl,-cref,-Map=_pcbnew.kiface.map"
  593. )
  594. set_target_properties( pcbnew PROPERTIES
  595. LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map"
  596. )
  597. endif()
  598. # if building pcbnew, then also build pcbnew_kiface if out of date.
  599. add_dependencies( pcbnew pcbnew_kiface )
  600. # add dependency to specctra_lexer_source_files, to force
  601. # generation of autogenerated file
  602. add_dependencies( pcbnew_kiface_objects specctra_lexer_source_files )
  603. # these 2 binaries are a matched set, keep them together:
  604. if( APPLE )
  605. set_target_properties( pcbnew PROPERTIES
  606. MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
  607. )
  608. # puts binaries into the *.app bundle while linking
  609. set_target_properties( pcbnew_kiface PROPERTIES
  610. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  611. )
  612. # put individual bundle outside of main bundle as a first step
  613. # will be pulled into the main bundle when creating main bundle
  614. install( TARGETS pcbnew
  615. DESTINATION ${KICAD_BIN}
  616. COMPONENT binary
  617. )
  618. install( CODE "
  619. # override default embedded path settings
  620. ${OSX_BUNDLE_OVERRIDE_PATHS}
  621. # do all the work
  622. include( BundleUtilities )
  623. fixup_bundle( ${KICAD_BIN}/pcbnew.app/Contents/MacOS/pcbnew
  624. \"\"
  625. \"\"
  626. )
  627. " COMPONENT Runtime
  628. )
  629. else()
  630. install( TARGETS pcbnew
  631. DESTINATION ${KICAD_BIN}
  632. COMPONENT binary
  633. )
  634. install( TARGETS pcbnew_kiface
  635. DESTINATION ${KICAD_BIN}
  636. COMPONENT binary
  637. )
  638. endif()
  639. if( KICAD_SCRIPTING )
  640. if( NOT APPLE )
  641. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
  642. else()
  643. # put into bundle at build time, it is relocated at install
  644. add_custom_target( ScriptingPcbnewPyCopy ALL
  645. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py" "${PYTHON_DEST}/"
  646. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
  647. COMMENT "Copying pcbnew.py into ${PYTHON_DEST}"
  648. )
  649. add_dependencies( ScriptingPcbnewPyCopy ScriptingWxpythonCopy )
  650. endif()
  651. # python plugins
  652. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
  653. DESTINATION ${KICAD_DATA}/scripting/plugins
  654. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  655. )
  656. # python shell
  657. if ( KICAD_SCRIPTING_WXPYTHON )
  658. install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/kicad_pyshell/
  659. DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell
  660. FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
  661. )
  662. endif()
  663. endif()
  664. if( KICAD_SCRIPTING_MODULES )
  665. # 1) KICAD_SCRIPTING enables python inside _pcbnew.kiface.
  666. # 2) KICAD_SCRIPTING_MODULES enables python from the OS command line for pcbnew.
  667. # When python is running within _pcbnew.kiface (case 1 above) it uses said
  668. # kiface for the native part of the pcbnew python module. This is a kind of
  669. # circular dependency that works well. When running python from
  670. # the command line (case 2 above) then python needs a native portion of the pcbnew
  671. # python module also, and this is _pcbnew.{so,pyd}. It turns out that the
  672. # kiface file is built adequately to serve the needs of 2) for now if it is
  673. # merely renamed. This is phase 1 of a 2 step plan.
  674. # In phase 2 we will use the _pcbnew.kiface file without renaming, by doctoring
  675. # what the python portion of the pcbnew python module wants to load when run
  676. # from the command line, case 2 above.
  677. # Here is built the _pcbnew.{so,pyd} which is the native part of the pcbnew Python library
  678. # when Python is used from the command line.
  679. if( MINGW )
  680. install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
  681. set( PYMOD_EXT "pyd" )
  682. elseif( APPLE )
  683. # put everything into bundle at build time, it is relocated at install
  684. add_custom_target( ScriptingModulesPcbnewSoCopy ALL
  685. COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
  686. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
  687. COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
  688. )
  689. add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
  690. set( PYMOD_EXT "so" )
  691. else() # only linux remains among supported platforms
  692. add_library( pcbnew_python MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
  693. target_link_libraries( pcbnew_python ${PCBNEW_KIFACE_LIBRARIES} )
  694. set_target_properties( pcbnew_python PROPERTIES OUTPUT_NAME pcbnew PREFIX "_" SUFFIX ".so" )
  695. install( TARGETS pcbnew_python DESTINATION ${PYTHON_DEST} COMPONENT binary )
  696. set( PYMOD_EXT "so" )
  697. endif()
  698. if( APPLE )
  699. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  700. DEPENDS pcbnew_kiface
  701. COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
  702. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  703. )
  704. add_custom_target(
  705. pcbnew_python_module ALL
  706. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  707. )
  708. else()
  709. # For phase 1, copy _pcbnew.kiface to the python module.
  710. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  711. DEPENDS pcbnew_kiface
  712. COMMAND ${CMAKE_COMMAND} -E copy _pcbnew.kiface _pcbnew.${PYMOD_EXT}
  713. COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
  714. )
  715. add_custom_target(
  716. pcbnew_python_module ALL
  717. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
  718. )
  719. endif()
  720. endif()
  721. if( APPLE )
  722. if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
  723. # find wx-X.Y-osx_cocoa path below PYTHON_SITE_PACKAGE_PATH
  724. file( GLOB WXPYTHON_DIR RELATIVE ${PYTHON_SITE_PACKAGE_PATH} ${PYTHON_SITE_PACKAGE_PATH}/wx-?.?-osx_cocoa )
  725. if( NOT WXPYTHON_DIR )
  726. message( FATAL_ERROR "Could not find 'wx-?.?-osx_cocoa' in '${PYTHON_SITE_PACKAGE_PATH}'" )
  727. endif()
  728. # copy contents
  729. add_custom_target( ScriptingWxpythonCopy ALL
  730. COMMAND ${CMAKE_COMMAND} -E copy_directory "${PYTHON_SITE_PACKAGE_PATH}/${WXPYTHON_DIR}" "${PYTHON_DEST}/${WXPYTHON_DIR}"
  731. COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_SITE_PACKAGE_PATH}/wxversion.py" "${PYTHON_DEST}"
  732. COMMENT "Copying wxPython into ${PYTHON_DEST}"
  733. )
  734. endif()
  735. endif()