2021-08-17 17:04:14 +00:00
|
|
|
add_definitions(-DPCB_CALCULATOR_BUILD)
|
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
include_directories( BEFORE ${INC_BEFORE} )
|
2012-01-23 04:33:36 +00:00
|
|
|
include_directories(
|
|
|
|
dialogs
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common
|
2012-01-23 04:33:36 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
2011-08-12 05:21:36 +00:00
|
|
|
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
set( PCB_CALCULATOR_SRCS
|
2020-09-15 14:03:07 +00:00
|
|
|
eserie.cpp
|
2019-05-01 18:57:59 +00:00
|
|
|
common_data.cpp
|
2011-08-12 05:21:36 +00:00
|
|
|
params_read_write.cpp
|
|
|
|
pcb_calculator_frame.cpp
|
2020-01-13 01:44:19 +00:00
|
|
|
pcb_calculator_settings.cpp
|
2012-04-02 18:11:00 +00:00
|
|
|
datafile_read_write.cpp
|
2021-10-08 14:44:44 +00:00
|
|
|
calculator_panels/panel_attenuators.cpp
|
|
|
|
calculator_panels/panel_attenuators_base.cpp
|
|
|
|
calculator_panels/panel_board_class.cpp
|
|
|
|
calculator_panels/panel_board_class_base.cpp
|
2022-06-16 22:04:45 +00:00
|
|
|
calculator_panels/panel_cable_size.cpp
|
|
|
|
calculator_panels/panel_cable_size_base.cpp
|
2021-10-08 14:44:44 +00:00
|
|
|
calculator_panels/panel_color_code.cpp
|
|
|
|
calculator_panels/panel_color_code_base.cpp
|
2022-03-29 22:23:46 +00:00
|
|
|
calculator_panels/panel_corrosion.cpp
|
|
|
|
calculator_panels/panel_corrosion_base.cpp
|
2021-10-08 14:44:44 +00:00
|
|
|
calculator_panels/panel_electrical_spacing.cpp
|
|
|
|
calculator_panels/panel_electrical_spacing_base.cpp
|
|
|
|
calculator_panels/panel_eserie.cpp
|
|
|
|
calculator_panels/panel_eserie_base.cpp
|
2022-06-21 23:34:36 +00:00
|
|
|
calculator_panels/panel_fusing_current.cpp
|
|
|
|
calculator_panels/panel_fusing_current_base.cpp
|
2021-10-08 14:44:44 +00:00
|
|
|
calculator_panels/panel_regulator.cpp
|
|
|
|
calculator_panels/panel_regulator_base.cpp
|
|
|
|
calculator_panels/panel_track_width.cpp
|
|
|
|
calculator_panels/panel_track_width_base.cpp
|
|
|
|
calculator_panels/panel_transline.cpp
|
|
|
|
calculator_panels/panel_transline_base.cpp
|
|
|
|
calculator_panels/panel_via_size.cpp
|
|
|
|
calculator_panels/panel_via_size_base.cpp
|
2022-07-06 18:28:59 +00:00
|
|
|
calculator_panels/panel_wavelength.cpp
|
|
|
|
calculator_panels/panel_wavelength_base.cpp
|
2011-08-12 05:21:36 +00:00
|
|
|
transline_ident.cpp
|
2020-10-13 01:01:25 +00:00
|
|
|
widgets/unit_selector.cpp
|
2011-08-12 05:21:36 +00:00
|
|
|
transline/transline.cpp
|
|
|
|
transline/c_microstrip.cpp
|
|
|
|
transline/microstrip.cpp
|
|
|
|
transline/coplanar.cpp
|
|
|
|
transline/coax.cpp
|
|
|
|
transline/rectwaveguide.cpp
|
|
|
|
transline/stripline.cpp
|
|
|
|
transline/twistedpair.cpp
|
|
|
|
transline_dlg_funct.cpp
|
|
|
|
attenuators/attenuator_classes.cpp
|
2020-10-13 01:17:40 +00:00
|
|
|
dialogs/dialog_regulator_form_base.cpp
|
|
|
|
dialogs/dialog_regulator_form.cpp
|
2022-07-06 18:28:59 +00:00
|
|
|
pcb_calculator_utils.cpp
|
2020-06-21 08:32:42 +00:00
|
|
|
../common/env_vars.cpp # needed on MSW to avoid a link issue (a symbol not found)
|
2011-08-12 05:21:36 +00:00
|
|
|
)
|
|
|
|
|
2021-12-29 04:54:27 +00:00
|
|
|
if( WIN32 )
|
|
|
|
if( MINGW )
|
|
|
|
# PCB_CALCULATOR_RESOURCES variable is set by the macro.
|
|
|
|
mingw_resource_compiler( pcb_calculator )
|
|
|
|
else()
|
|
|
|
set( PCB_CALCULATOR_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/pcb_calculator.rc )
|
|
|
|
endif()
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
endif()
|
|
|
|
|
2022-01-31 23:57:56 +00:00
|
|
|
if( APPLE )
|
2014-10-17 17:45:33 +00:00
|
|
|
# setup bundle
|
|
|
|
set( PCB_CALCULATOR_RESOURCES pcb_calculator.icns )
|
|
|
|
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns" PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
set( MACOSX_BUNDLE_ICON_FILE pcb_calculator.icns )
|
2021-07-31 03:27:05 +00:00
|
|
|
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
|
2014-10-17 17:45:33 +00:00
|
|
|
set( MACOSX_BUNDLE_NAME pcb_calculator )
|
|
|
|
endif()
|
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
add_executable( pcb_calculator WIN32 MACOSX_BUNDLE
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/single_top.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/common/pgm_base.cpp
|
2014-10-26 19:54:48 +00:00
|
|
|
${PCB_CALCULATOR_RESOURCES}
|
|
|
|
)
|
2020-01-22 23:27:20 +00:00
|
|
|
set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
|
2014-10-26 19:54:48 +00:00
|
|
|
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CALC;BUILD_KIWAY_DLL"
|
|
|
|
)
|
|
|
|
target_link_libraries( pcb_calculator
|
|
|
|
#singletop # replaces common, giving us restrictive control and link warnings.
|
|
|
|
# There's way too much crap coming in from common yet.
|
|
|
|
common
|
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
)
|
2011-08-12 05:21:36 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
set_target_properties( pcb_calculator PROPERTIES
|
2019-03-15 05:13:09 +00:00
|
|
|
LINK_FLAGS "-Wl,-cref,-Map=pcb_calculator.map" )
|
2014-10-26 19:54:48 +00:00
|
|
|
endif()
|
2011-08-12 05:21:36 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# the main pcb_calculator program, in DSO form.
|
|
|
|
add_library( pcb_calculator_kiface MODULE
|
|
|
|
pcb_calculator.cpp
|
|
|
|
${PCB_CALCULATOR_SRCS}
|
|
|
|
)
|
2021-12-29 04:54:27 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
set_target_properties( pcb_calculator_kiface PROPERTIES
|
|
|
|
OUTPUT_NAME pcb_calculator
|
|
|
|
PREFIX ${KIFACE_PREFIX}
|
|
|
|
SUFFIX ${KIFACE_SUFFIX}
|
|
|
|
)
|
|
|
|
target_link_libraries( pcb_calculator_kiface
|
|
|
|
common
|
2019-10-01 15:03:00 +00:00
|
|
|
markdown_lib
|
2014-10-26 19:54:48 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
)
|
|
|
|
set_source_files_properties( pcb_calculator.cpp PROPERTIES
|
|
|
|
# The KIFACE is in pcb_calculator.cpp, export it:
|
|
|
|
COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
|
|
|
|
)
|
2014-10-17 17:45:33 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
if( MAKE_LINK_MAPS )
|
|
|
|
set_target_properties( pcb_calculator_kiface PROPERTIES
|
2019-03-15 05:13:09 +00:00
|
|
|
LINK_FLAGS "-Wl,-cref,-Map=_pcb_calculator.kiface.map" )
|
2014-10-26 19:54:48 +00:00
|
|
|
endif()
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# if building pcb_calculator, then also build pcb_calculator_kiface if out of date.
|
|
|
|
add_dependencies( pcb_calculator pcb_calculator_kiface )
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# these 2 binaries are a matched set, keep them together
|
2022-01-31 23:57:56 +00:00
|
|
|
if( APPLE )
|
2014-10-26 19:54:48 +00:00
|
|
|
set_target_properties( pcb_calculator PROPERTIES
|
2019-12-26 12:42:25 +00:00
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcb_calculator/Info.plist
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
|
|
|
|
# puts binaries into the *.app bundle while linking
|
|
|
|
set_target_properties( pcb_calculator_kiface PROPERTIES
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
|
|
|
|
# put individual bundle outside of main bundle as a first step
|
|
|
|
# will be pulled into the main bundle when creating main bundle
|
|
|
|
install( TARGETS pcb_calculator
|
|
|
|
DESTINATION ${KICAD_BIN}
|
|
|
|
COMPONENT binary
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
install( CODE "
|
|
|
|
# override default embedded path settings
|
|
|
|
${OSX_BUNDLE_OVERRIDE_PATHS}
|
|
|
|
|
|
|
|
# do all the work
|
|
|
|
include( BundleUtilities )
|
|
|
|
fixup_bundle( ${KICAD_BIN}/pcb_calculator.app/Contents/MacOS/pcb_calculator
|
|
|
|
\"\"
|
2022-04-20 14:17:06 +00:00
|
|
|
\"${PYTHON_FRAMEWORK}\"
|
2014-10-26 19:54:48 +00:00
|
|
|
)
|
|
|
|
" COMPONENT Runtime
|
* 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.
2014-03-20 00:42:08 +00:00
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
else()
|
2021-12-29 04:54:27 +00:00
|
|
|
if( MSVC )
|
|
|
|
target_sources( pcb_calculator_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/pcb_calculator-dll.rc )
|
|
|
|
endif()
|
|
|
|
|
2014-10-17 17:45:33 +00:00
|
|
|
install( TARGETS pcb_calculator
|
|
|
|
DESTINATION ${KICAD_BIN}
|
|
|
|
COMPONENT binary
|
|
|
|
)
|
2014-10-26 19:54:48 +00:00
|
|
|
install( TARGETS pcb_calculator_kiface
|
2022-06-22 21:33:46 +00:00
|
|
|
DESTINATION ${KICAD_KIFACE}
|
2014-10-26 19:54:48 +00:00
|
|
|
COMPONENT binary
|
|
|
|
)
|
2014-05-09 14:27:21 +00:00
|
|
|
endif()
|
2014-10-22 23:25:59 +00:00
|
|
|
|
2021-07-15 03:31:56 +00:00
|
|
|
if( KICAD_WIN32_INSTALL_PDBS )
|
|
|
|
# Get the PDBs to copy over for MSVC
|
|
|
|
install(FILES $<TARGET_PDB_FILE:pcb_calculator> DESTINATION ${KICAD_BIN})
|
2022-06-22 21:33:46 +00:00
|
|
|
install(FILES $<TARGET_PDB_FILE:pcb_calculator_kiface> DESTINATION ${KICAD_KIFACE})
|
2021-07-15 03:31:56 +00:00
|
|
|
endif()
|
|
|
|
|
2014-10-22 23:25:59 +00:00
|
|
|
# auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp
|
|
|
|
# for the storage data file format.
|
|
|
|
make_lexer(
|
2019-07-03 09:08:55 +00:00
|
|
|
pcb_calculator_kiface
|
|
|
|
pcb_calculator_datafile.keywords
|
|
|
|
pcb_calculator_datafile_lexer.h
|
|
|
|
pcb_calculator_datafile_keywords.cpp
|
2014-10-22 23:25:59 +00:00
|
|
|
PCBCALC_DATA_T
|
|
|
|
)
|
|
|
|
|
2016-01-16 14:27:42 +00:00
|
|
|
#
|
|
|
|
# Conversion of .html doc source files to .h files included in cpp sources
|
|
|
|
#
|
|
|
|
# Function html_doc2h : converts a single *.html text file to a *.h header
|
|
|
|
function( html_doc2h inputFile )
|
|
|
|
add_custom_command(
|
2016-08-30 13:04:25 +00:00
|
|
|
OUTPUT ${inputFile}.h
|
|
|
|
COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile}.html -DoutputFile=${inputFile}.h
|
2021-01-27 21:49:34 +00:00
|
|
|
-P ${CMAKE_MODULE_PATH}/BuildSteps/Html2C.cmake
|
|
|
|
DEPENDS ${inputFile}.html ${CMAKE_MODULE_PATH}/BuildSteps/Html2C.cmake
|
2016-08-30 13:04:25 +00:00
|
|
|
COMMENT "creating ${inputFile}.h from ${inputFile}.html"
|
2016-01-16 14:27:42 +00:00
|
|
|
)
|
|
|
|
endfunction()
|
2019-09-29 15:25:56 +00:00
|
|
|
#
|
|
|
|
# Conversion of .md doc source files to .h files included in cpp sources
|
|
|
|
#
|
|
|
|
# Function md_doc2h : converts a single *.md text file to a *.h header
|
|
|
|
function( md_doc2h inputFile )
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${inputFile}.h
|
|
|
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile}.md -DoutputFile=${inputFile}.h
|
2021-01-27 21:49:34 +00:00
|
|
|
-P ${CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
|
|
|
|
DEPENDS ${inputFile}.md ${CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
|
2019-09-29 15:25:56 +00:00
|
|
|
COMMENT "creating ${inputFile}.h from ${inputFile}.md"
|
|
|
|
)
|
|
|
|
endfunction()
|
2016-01-16 14:27:42 +00:00
|
|
|
|
2019-09-29 15:25:56 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/bridget_tee_formula )
|
2019-09-29 16:06:41 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/splitter_formula )
|
2019-09-29 16:54:14 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula )
|
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/tee_formula )
|
2020-01-22 23:27:20 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/tracks_width_versus_current_formula )
|
2020-09-15 14:03:07 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/eserie_help )
|
2022-06-21 23:34:36 +00:00
|
|
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help )
|
2016-01-16 14:27:42 +00:00
|
|
|
|
|
|
|
set( DOCS_LIST
|
2016-08-30 13:04:25 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/tee_formula.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/bridget_tee_formula.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/splitter_formula.h
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/tracks_width_versus_current_formula.h
|
2020-09-15 14:03:07 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/eserie_help.h
|
2022-06-21 23:34:36 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help.h
|
2016-01-16 14:27:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set_source_files_properties( attenuators/attenuator_classes.cpp
|
|
|
|
PROPERTIES OBJECT_DEPENDS "${DOCS_LIST}"
|
|
|
|
)
|