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 <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Dec 9, 2024
1 parent 65c1407 commit c6e8339
Show file tree
Hide file tree
Showing 10 changed files with 16 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)
1 change: 1 addition & 0 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ if(NOT BUILD_LIBRARIES_ONLY)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES $<TARGET_PDB_FILE:nextcloudcmd> DESTINATION bin OPTIONAL)
endif()
endif()
2 changes: 2 additions & 0 deletions src/csync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,6 @@ else()
)
endif()

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

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

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

# 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
1 change: 1 addition & 0 deletions src/libsync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,6 @@ else()
install(TARGETS nextcloudsync DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
endif()

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

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)
1 change: 1 addition & 0 deletions src/libsync/vfs/suffix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ install(TARGETS nextcloudsync_vfs_suffix
RUNTIME DESTINATION "${vfs_installdir}"
)

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

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

0 comments on commit c6e8339

Please sign in to comment.