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.

259 lines
9.5 KiB

* 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. add_compile_definitions( PCB_CALCULATOR_BUILD )
  2. include_directories( BEFORE ${INC_BEFORE} )
  3. include_directories(
  4. dialogs
  5. ${CMAKE_SOURCE_DIR}/common
  6. ${INC_AFTER}
  7. )
  8. set( PCB_CALCULATOR_SRCS
  9. common_data.cpp
  10. eseries.cpp
  11. params_read_write.cpp
  12. pcb_calculator_control.cpp
  13. pcb_calculator_frame.cpp
  14. pcb_calculator_settings.cpp
  15. datafile_read_write.cpp
  16. calculator_panels/panel_rf_attenuators.cpp
  17. calculator_panels/panel_rf_attenuators_base.cpp
  18. calculator_panels/panel_board_class.cpp
  19. calculator_panels/panel_board_class_base.cpp
  20. calculator_panels/panel_cable_size.cpp
  21. calculator_panels/panel_cable_size_base.cpp
  22. calculator_panels/panel_color_code.cpp
  23. calculator_panels/panel_color_code_base.cpp
  24. calculator_panels/panel_eseries_display.cpp
  25. calculator_panels/panel_eseries_display_base.cpp
  26. calculator_panels/panel_galvanic_corrosion.cpp
  27. calculator_panels/panel_galvanic_corrosion_base.cpp
  28. calculator_panels/panel_electrical_spacing.cpp
  29. calculator_panels/panel_electrical_spacing_base.cpp
  30. calculator_panels/iec60664.cpp
  31. calculator_panels/panel_electrical_spacing_iec60664.cpp
  32. calculator_panels/panel_electrical_spacing_iec60664_base.cpp
  33. calculator_panels/panel_electrical_spacing_ipc2221.cpp
  34. calculator_panels/panel_electrical_spacing_ipc2221_base.cpp
  35. calculator_panels/panel_r_calculator.cpp
  36. calculator_panels/panel_r_calculator_base.cpp
  37. calculator_panels/panel_fusing_current.cpp
  38. calculator_panels/panel_fusing_current_base.cpp
  39. calculator_panels/panel_regulator.cpp
  40. calculator_panels/panel_regulator_base.cpp
  41. calculator_panels/panel_track_width.cpp
  42. calculator_panels/panel_track_width_base.cpp
  43. calculator_panels/panel_transline.cpp
  44. calculator_panels/panel_transline_base.cpp
  45. calculator_panels/panel_via_size.cpp
  46. calculator_panels/panel_via_size_base.cpp
  47. calculator_panels/panel_wavelength.cpp
  48. calculator_panels/panel_wavelength_base.cpp
  49. transline_ident.cpp
  50. widgets/unit_selector.cpp
  51. transline/transline.cpp
  52. transline/c_microstrip.cpp
  53. transline/microstrip.cpp
  54. transline/coplanar.cpp
  55. transline/coax.cpp
  56. transline/rectwaveguide.cpp
  57. transline/stripline.cpp
  58. transline/twistedpair.cpp
  59. transline_dlg_funct.cpp
  60. attenuators/attenuator_classes.cpp
  61. dialogs/dialog_regulator_form_base.cpp
  62. dialogs/dialog_regulator_form.cpp
  63. pcb_calculator_utils.cpp
  64. resistor_substitution_utils.cpp
  65. )
  66. if( WIN32 )
  67. if( MINGW )
  68. # PCB_CALCULATOR_RESOURCES variable is set by the macro.
  69. mingw_resource_compiler( pcb_calculator )
  70. else()
  71. set( PCB_CALCULATOR_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/pcb_calculator.rc )
  72. endif()
  73. endif()
  74. if( APPLE )
  75. # setup bundle
  76. set( PCB_CALCULATOR_RESOURCES pcb_calculator.icns )
  77. set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns" PROPERTIES
  78. MACOSX_PACKAGE_LOCATION Resources
  79. )
  80. set( MACOSX_BUNDLE_ICON_FILE pcb_calculator.icns )
  81. set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
  82. set( MACOSX_BUNDLE_NAME pcb_calculator )
  83. endif()
  84. add_executable( pcb_calculator WIN32 MACOSX_BUNDLE
  85. ${CMAKE_SOURCE_DIR}/common/single_top.cpp
  86. ${PCB_CALCULATOR_RESOURCES}
  87. )
  88. set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
  89. COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CALC;BUILD_KIWAY_DLL"
  90. )
  91. target_link_libraries( pcb_calculator
  92. kicommon
  93. ${wxWidgets_LIBRARIES}
  94. )
  95. target_link_options( pcb_calculator PRIVATE
  96. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=pcb_calculator.map>
  97. )
  98. # the main pcb_calculator program, in DSO form.
  99. add_library( pcb_calculator_kiface MODULE
  100. pcb_calculator.cpp
  101. ${PCB_CALCULATOR_SRCS}
  102. )
  103. set_target_properties( pcb_calculator_kiface PROPERTIES
  104. OUTPUT_NAME pcb_calculator
  105. PREFIX ${KIFACE_PREFIX}
  106. SUFFIX ${KIFACE_SUFFIX}
  107. )
  108. target_link_libraries( pcb_calculator_kiface
  109. common
  110. markdown_lib
  111. ${wxWidgets_LIBRARIES}
  112. )
  113. set_source_files_properties( pcb_calculator.cpp PROPERTIES
  114. # The KIFACE is in pcb_calculator.cpp, export it:
  115. COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
  116. )
  117. target_link_options( pcb_calculator_kiface PRIVATE
  118. $<$<BOOL:${KICAD_MAKE_LINK_MAPS}>:-Wl,--cref,-Map=_pcb_calculator.kiface.map>
  119. )
  120. # if building pcb_calculator, then also build pcb_calculator_kiface if out of date.
  121. add_dependencies( pcb_calculator pcb_calculator_kiface )
  122. # these 2 binaries are a matched set, keep them together
  123. if( APPLE )
  124. set_target_properties( pcb_calculator PROPERTIES
  125. MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcb_calculator/Info.plist
  126. )
  127. # puts binaries into the *.app bundle while linking
  128. set_target_properties( pcb_calculator_kiface PROPERTIES
  129. LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
  130. )
  131. set_target_properties( pcb_calculator PROPERTIES INSTALL_RPATH
  132. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  133. set_target_properties( pcb_calculator_kiface PROPERTIES INSTALL_RPATH
  134. "@executable_path/../Frameworks;@executable_path/../Frameworks/Python.framework" )
  135. set_target_properties( pcb_calculator_kiface PROPERTIES BUILD_WITH_INSTALL_RPATH 1 )
  136. # put individual bundle outside of main bundle as a first step
  137. # will be pulled into the main bundle when creating main bundle
  138. install( TARGETS pcb_calculator
  139. DESTINATION ${KICAD_BIN}
  140. COMPONENT binary
  141. )
  142. install( CODE "
  143. set( KICAD_CMAKE_MODULE_PATH \"${KICAD_CMAKE_MODULE_PATH}\" )
  144. set( KICAD_BIN \"${KICAD_BIN}\" )
  145. set( OSX_BUNDLE_INSTALL_BIN_DIR \"${OSX_BUNDLE_INSTALL_BIN_DIR}\" )
  146. set( OSX_BUNDLE_INSTALL_LIB_DIR \"${OSX_BUNDLE_INSTALL_LIB_DIR}\" )
  147. " )
  148. install( CODE [[
  149. include( ${KICAD_CMAKE_MODULE_PATH}/InstallSteps/InstallMacOS.cmake )
  150. # Install any dependencies (this will generally duplicate kicad.app but we can't be sure)
  151. install_runtime_deps( "${KICAD_BIN}/pcb_calculator.app/Contents/MacOS/pcb_calculator"
  152. ""
  153. ""
  154. )
  155. ]] )
  156. else()
  157. if( MSVC )
  158. target_sources( pcb_calculator_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/pcb_calculator-dll.rc )
  159. endif()
  160. install( TARGETS pcb_calculator
  161. DESTINATION ${KICAD_BIN}
  162. COMPONENT binary
  163. )
  164. install( TARGETS pcb_calculator_kiface
  165. DESTINATION ${KICAD_KIFACE}
  166. COMPONENT binary
  167. )
  168. endif()
  169. if( KICAD_WIN32_INSTALL_PDBS )
  170. # Get the PDBs to copy over for MSVC
  171. install(FILES $<TARGET_PDB_FILE:pcb_calculator> DESTINATION ${KICAD_BIN})
  172. install(FILES $<TARGET_PDB_FILE:pcb_calculator_kiface> DESTINATION ${KICAD_KIFACE})
  173. endif()
  174. # auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp
  175. # for the storage data file format.
  176. make_lexer(
  177. pcb_calculator_kiface
  178. pcb_calculator_datafile.keywords
  179. pcb_calculator_datafile_lexer.h
  180. pcb_calculator_datafile_keywords.cpp
  181. PCBCALC_DATA_T
  182. )
  183. #
  184. # Conversion of .html doc source files to .h files included in cpp sources
  185. #
  186. # Function html_doc2h : converts a single *.html text file to a *.h header
  187. function( html_doc2h inputFile )
  188. add_custom_command(
  189. OUTPUT ${inputFile}.h
  190. COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile}.html -DoutputFile=${inputFile}.h
  191. -P ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/Html2C.cmake
  192. DEPENDS ${inputFile}.html ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/Html2C.cmake
  193. COMMENT "creating ${inputFile}.h from ${inputFile}.html"
  194. )
  195. endfunction()
  196. #
  197. # Conversion of .md doc source files to .h files included in cpp sources
  198. #
  199. # Function md_doc2h : converts a single *.md text file to a *.h header
  200. function( md_doc2h inputFile )
  201. add_custom_command(
  202. OUTPUT ${inputFile}.h
  203. COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile}.md -DoutputFile=${inputFile}.h
  204. -P ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  205. DEPENDS ${inputFile}.md ${KICAD_CMAKE_MODULE_PATH}/BuildSteps/markdown2C.cmake
  206. COMMENT "creating ${inputFile}.h from ${inputFile}.md"
  207. )
  208. endfunction()
  209. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/bridget_tee_formula )
  210. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/splitter_formula )
  211. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula )
  212. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/tee_formula )
  213. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/tracks_width_versus_current_formula )
  214. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/eseries_display_help )
  215. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/r_calculator_help )
  216. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help )
  217. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help )
  218. md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/iec60664_help )
  219. set( DOCS_LIST
  220. ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula.h
  221. ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/tee_formula.h
  222. ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/bridget_tee_formula.h
  223. ${CMAKE_CURRENT_SOURCE_DIR}/attenuators/splitter_formula.h
  224. ${CMAKE_CURRENT_SOURCE_DIR}/tracks_width_versus_current_formula.h
  225. ${CMAKE_CURRENT_SOURCE_DIR}/eseries_display_help.h
  226. ${CMAKE_CURRENT_SOURCE_DIR}/r_calculator_help.h
  227. ${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help.h
  228. ${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help.h
  229. ${CMAKE_CURRENT_SOURCE_DIR}/iec60664_help.h
  230. )
  231. set_source_files_properties( attenuators/attenuator_classes.cpp
  232. PROPERTIES OBJECT_DEPENDS "${DOCS_LIST}"
  233. )