2020-05-06 00:47:20 +00:00
|
|
|
# Add all the warnings to the files
|
|
|
|
if( COMPILER_SUPPORTS_WARNINGS )
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS_CXX}")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}")
|
2017-02-23 10:40:40 +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
|
|
|
add_definitions( -DCVPCB )
|
2012-01-23 04:33:36 +00:00
|
|
|
|
2013-08-20 18:03:21 +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}/3d-viewer
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew/dialogs
|
|
|
|
${CMAKE_SOURCE_DIR}/common
|
2021-10-10 12:52:37 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/dialogs
|
2012-01-23 04:33:36 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
2007-11-08 07:17:37 +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
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( CVPCB_DIALOGS
|
2014-10-28 15:15:39 +00:00
|
|
|
dialogs/fp_conflict_assignment_selector_base.cpp
|
|
|
|
dialogs/fp_conflict_assignment_selector.cpp
|
2015-01-11 17:22:45 +00:00
|
|
|
dialogs/dialog_config_equfiles_base.cpp
|
|
|
|
dialogs/dialog_config_equfiles.cpp
|
2010-10-28 13:02:07 +00:00
|
|
|
)
|
|
|
|
|
2013-08-20 18:03:21 +00:00
|
|
|
set( CVPCB_SRCS
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/base_units.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/stackup_predefined_prms.cpp
|
2021-06-25 16:41:34 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew/footprint_info_impl.cpp
|
2018-01-28 08:51:28 +00:00
|
|
|
auto_associate.cpp
|
2021-09-27 11:55:53 +00:00
|
|
|
symbols_listbox.cpp
|
2018-01-28 08:51:28 +00:00
|
|
|
display_footprints_frame.cpp
|
|
|
|
footprints_listbox.cpp
|
|
|
|
library_listbox.cpp
|
2016-01-06 07:36:08 +00:00
|
|
|
cvpcb_mainframe.cpp
|
2020-01-13 01:44:19 +00:00
|
|
|
cvpcb_settings.cpp
|
2018-01-28 08:51:28 +00:00
|
|
|
listbox_base.cpp
|
2010-12-17 20:34:29 +00:00
|
|
|
menubar.cpp
|
2012-02-11 09:04:26 +00:00
|
|
|
readwrite_dlgs.cpp
|
2018-08-08 15:26:33 +00:00
|
|
|
toolbars_cvpcb.cpp
|
2019-06-17 00:34:21 +00:00
|
|
|
tools/cvpcb_actions.cpp
|
2019-08-09 22:13:17 +00:00
|
|
|
tools/cvpcb_association_tool.cpp
|
2019-07-18 21:47:01 +00:00
|
|
|
tools/cvpcb_control.cpp
|
2019-07-18 20:32:12 +00:00
|
|
|
tools/cvpcb_fpviewer_selection_tool.cpp
|
2011-12-07 05:28:49 +00:00
|
|
|
)
|
2007-11-08 07:17:37 +00:00
|
|
|
|
2021-12-29 04:54:27 +00:00
|
|
|
if( WIN32 )
|
|
|
|
if( MINGW )
|
|
|
|
# CVPCB_RESOURCES variable is set by the macro.
|
|
|
|
mingw_resource_compiler( cvpcb-dll )
|
|
|
|
else()
|
|
|
|
set( CVPCB_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/cvpcb-dll.rc )
|
|
|
|
endif()
|
2013-08-20 18:03:21 +00:00
|
|
|
endif()
|
2008-09-07 19:32:07 +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
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
# the main cvpcb program, in DSO form.
|
|
|
|
add_library( cvpcb_kiface MODULE
|
|
|
|
cvpcb.cpp
|
|
|
|
${CVPCB_SRCS}
|
|
|
|
${CVPCB_DIALOGS}
|
2021-12-29 04:54:27 +00:00
|
|
|
${CVPCB_RESOURCES}
|
2014-10-26 19:54:48 +00:00
|
|
|
)
|
2016-02-24 16:30:35 +00:00
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
set_target_properties( cvpcb_kiface PROPERTIES
|
|
|
|
OUTPUT_NAME cvpcb
|
|
|
|
PREFIX ${KIFACE_PREFIX}
|
|
|
|
SUFFIX ${KIFACE_SUFFIX}
|
|
|
|
)
|
|
|
|
target_link_libraries( cvpcb_kiface
|
|
|
|
pcbcommon
|
2018-05-10 10:49:20 +00:00
|
|
|
3d-viewer
|
2018-08-03 12:27:03 +00:00
|
|
|
gal
|
|
|
|
common
|
2020-01-07 17:12:59 +00:00
|
|
|
kimath
|
2020-08-23 19:01:08 +00:00
|
|
|
${PCBNEW_IO_LIBRARIES}
|
2014-10-26 19:54:48 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
${GDI_PLUS_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
# Must follow github_plugin
|
|
|
|
target_link_libraries( cvpcb_kiface ${Boost_LIBRARIES} )
|
|
|
|
|
2022-06-15 00:41:10 +00:00
|
|
|
target_include_directories( cvpcb_kiface PRIVATE
|
|
|
|
$<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES>
|
|
|
|
)
|
|
|
|
|
2014-10-26 19:54:48 +00:00
|
|
|
if( UNIX AND NOT APPLE )
|
|
|
|
# -lrt must follow Boost
|
|
|
|
target_link_libraries( cvpcb_kiface rt )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_source_files_properties( cvpcb.cpp PROPERTIES
|
|
|
|
# The KIFACE is in cvpcb.cpp, export it:
|
|
|
|
COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
|
|
|
|
)
|
* 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( MAKE_LINK_MAPS )
|
|
|
|
set_target_properties( cvpcb_kiface PROPERTIES
|
2019-03-15 05:13:09 +00:00
|
|
|
LINK_FLAGS "-Wl,-cref,-Map=_cvpcb.kiface.map" )
|
2014-10-26 19:54:48 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# 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
|
|
|
# puts binaries into the *.app bundle while linking
|
|
|
|
set_target_properties( cvpcb_kiface PROPERTIES
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
install( TARGETS cvpcb_kiface
|
2022-06-22 21:33:46 +00:00
|
|
|
DESTINATION ${KICAD_KIFACE}
|
2014-10-26 19:54:48 +00:00
|
|
|
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
|
|
|
endif()
|
2021-07-15 03:31:56 +00:00
|
|
|
|
|
|
|
if( KICAD_WIN32_INSTALL_PDBS )
|
|
|
|
# Get the PDBs to copy over for MSVC
|
2022-06-22 21:33:46 +00:00
|
|
|
install(FILES $<TARGET_PDB_FILE:cvpcb_kiface> DESTINATION ${KICAD_KIFACE})
|
2021-10-10 12:52:37 +00:00
|
|
|
endif()
|