Skip to content

Commit

Permalink
optionally install PDB files when building them
Browse files Browse the repository at this point in the history
would allow installing PDB files when doing Windows builds producing
debug symbols

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Dec 11, 2024
1 parent 96d890f commit 32d6bbb
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shell_integration/windows/NCContextMenu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ install(TARGETS NCContextMenu
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES $<TARGET_PDB_FILE:NCContextMenu> DESTINATION bin OPTIONAL)
2 changes: 2 additions & 0 deletions shell_integration/windows/NCOverlays/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ install(TARGETS NCOverlays
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES $<TARGET_PDB_FILE:NCOverlays> DESTINATION bin OPTIONAL)
3 changes: 3 additions & 0 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ if(NOT BUILD_LIBRARIES_ONLY)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloudcmd> DESTINATION bin OPTIONAL)
endif()
endif()
endif()
4 changes: 4 additions & 0 deletions src/csync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,8 @@ else()
)
endif()

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloud_csync> DESTINATION bin OPTIONAL)
endif()

configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
3 changes: 3 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,9 @@ install(TARGETS nextcloud
BUNDLE DESTINATION "."
)

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloud> DESTINATION bin OPTIONAL)
endif()

# FIXME: The following lines are dup in src/gui and src/cmd because it needs to be done after both are installed
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
Expand Down
3 changes: 3 additions & 0 deletions src/libsync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,8 @@ else()
install(TARGETS nextcloudsync DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
endif()

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloudsync> DESTINATION bin OPTIONAL)
endif()

add_subdirectory(vfs)
2 changes: 2 additions & 0 deletions src/libsync/vfs/cfapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ if (WIN32)
LIBRARY DESTINATION "${vfs_installdir}"
RUNTIME DESTINATION "${vfs_installdir}"
)

install(FILES $<TARGET_PDB_FILE:nextcloudsync_vfs_cfapi> DESTINATION bin OPTIONAL)
endif()
2 changes: 2 additions & 0 deletions src/libsync/vfs/cfapi/shellext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,6 @@ install(TARGETS CfApiShellExtensions
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES $<TARGET_PDB_FILE:CfApiShellExtensions> DESTINATION bin OPTIONAL)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configvfscfapishellext.h.in ${CMAKE_CURRENT_BINARY_DIR}/configvfscfapishellext.h)
3 changes: 3 additions & 0 deletions src/libsync/vfs/suffix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ install(TARGETS nextcloudsync_vfs_suffix
RUNTIME DESTINATION "${vfs_installdir}"
)

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloudsync_vfs_suffix> DESTINATION bin OPTIONAL)
endif()
4 changes: 4 additions & 0 deletions src/libsync/vfs/xattr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ if (LINUX)
LIBRARY DESTINATION "${vfs_installdir}"
RUNTIME DESTINATION "${vfs_installdir}"
)

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloudsync_vfs_xattr> DESTINATION bin OPTIONAL)
endif()
endif()

0 comments on commit 32d6bbb

Please sign in to comment.