Add pdb install option for msvc

This commit is contained in:
Marek Roszko 2021-07-14 23:31:56 -04:00
parent 6cde086ef9
commit c794a6ce7a
14 changed files with 78 additions and 2 deletions

View File

@ -104,3 +104,8 @@ install( TARGETS
LIBRARY DESTINATION ${KICAD_LIB}
COMPONENT binary
)
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:kicad_3dsg> DESTINATION ${KICAD_BIN})
endif()

View File

@ -146,6 +146,11 @@ option( KICAD_GAL_PROFILE
"Enable profiling info for GAL"
OFF )
cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS
"Installs debug pdb to the bin folder, NOT REQUIRED FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building."
OFF "WIN32"
OFF )
# Global setting: exports are explicit
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )

View File

@ -85,6 +85,10 @@ else()
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:bitmap2component> DESTINATION ${KICAD_BIN})
endif()
if( false ) # linker map with cross reference
set_target_properties( bitmap2component PROPERTIES

View File

@ -107,3 +107,8 @@ else()
COMPONENT binary
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:cvpcb_kiface> DESTINATION ${KICAD_BIN})
endif()

View File

@ -494,6 +494,13 @@ else()
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:eeschema> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:eeschema_kiface> DESTINATION ${KICAD_BIN})
endif()
# auto-generate cmp_library_lexer.h and cmp_library_keywords.cpp for the component
# library format.
make_lexer(

View File

@ -211,3 +211,10 @@ else()
COMPONENT binary
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:gerbview> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:gerbview_kiface> DESTINATION ${KICAD_BIN})
endif()

View File

@ -95,11 +95,17 @@ install( TARGETS kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:kicad> DESTINATION ${KICAD_BIN})
endif()
if( APPLE )
# "install( CODE ... )" will launch its own CMake, so no variables from
# this CMake instance are accessible... use helper to transfer
set( SCRIPTING_HELPER "1" )
if( KICAD_SPICE )
set( SPICE_HELPER "1" )
else()

View File

@ -166,3 +166,9 @@ else()
COMPONENT binary
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pl_editor> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pl_editor_kiface> DESTINATION ${KICAD_BIN})
endif()

View File

@ -143,6 +143,12 @@ else()
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pcb_calculator> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcb_calculator_kiface> DESTINATION ${KICAD_BIN})
endif()
# auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp
# for the storage data file format.
make_lexer(

View File

@ -766,6 +766,11 @@ else()
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pcbnew> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_BIN})
endif()
if( NOT APPLE )
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )

View File

@ -41,3 +41,8 @@ install( TARGETS
DESTINATION ${KICAD_USER_PLUGIN}/3d
COMPONENT binary
)
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:s3d_plugin_idf> DESTINATION ${KICAD_USER_PLUGIN}/3d)
endif()

View File

@ -22,7 +22,7 @@ target_link_libraries( s3d_plugin_oce kicad_3dsg ${OCC_LIBRARIES} ${wxWidgets_LI
target_include_directories( s3d_plugin_oce PRIVATE
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>
)
if( APPLE )
# puts library into the main kicad.app bundle in build tree
set_target_properties( s3d_plugin_oce PROPERTIES
@ -35,3 +35,8 @@ install( TARGETS
DESTINATION ${KICAD_USER_PLUGIN}/3d
COMPONENT binary
)
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:s3d_plugin_oce> DESTINATION ${KICAD_USER_PLUGIN}/3d)
endif()

View File

@ -83,3 +83,8 @@ install( TARGETS
DESTINATION ${KICAD_USER_PLUGIN}/3d
COMPONENT binary
)
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:s3d_plugin_vrml> DESTINATION ${KICAD_USER_PLUGIN}/3d)
endif()

View File

@ -62,3 +62,8 @@ else()
DESTINATION ${KICAD_BIN}
COMPONENT binary )
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:kicad2step> DESTINATION ${KICAD_BIN})
endif()