From be85f3c1ec494f96cdb4d417e1f4b4b678b7074b Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 3 Dec 2024 14:45:59 +0100 Subject: [PATCH] optionally install PDB files when building them would allow installing PDB files when doing Windows builds producing debug symbols Signed-off-by: Matthieu Gallien --- shell_integration/windows/NCContextMenu/CMakeLists.txt | 2 ++ shell_integration/windows/NCOverlays/CMakeLists.txt | 2 ++ src/cmd/CMakeLists.txt | 3 +++ src/csync/CMakeLists.txt | 4 ++++ src/gui/CMakeLists.txt | 3 +++ src/libsync/CMakeLists.txt | 3 +++ src/libsync/vfs/cfapi/CMakeLists.txt | 2 ++ src/libsync/vfs/cfapi/shellext/CMakeLists.txt | 2 ++ src/libsync/vfs/suffix/CMakeLists.txt | 3 +++ src/libsync/vfs/xattr/CMakeLists.txt | 4 ++++ 10 files changed, 28 insertions(+) diff --git a/shell_integration/windows/NCContextMenu/CMakeLists.txt b/shell_integration/windows/NCContextMenu/CMakeLists.txt index 43d60d1b03358..4e76bb5396233 100644 --- a/shell_integration/windows/NCContextMenu/CMakeLists.txt +++ b/shell_integration/windows/NCContextMenu/CMakeLists.txt @@ -23,3 +23,5 @@ install(TARGETS NCContextMenu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR} ) + +install(FILES $ DESTINATION bin OPTIONAL) diff --git a/shell_integration/windows/NCOverlays/CMakeLists.txt b/shell_integration/windows/NCOverlays/CMakeLists.txt index 3b141138a632e..4c1f5e83de6cf 100644 --- a/shell_integration/windows/NCOverlays/CMakeLists.txt +++ b/shell_integration/windows/NCOverlays/CMakeLists.txt @@ -22,3 +22,5 @@ install(TARGETS NCOverlays RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR} ) + +install(FILES $ DESTINATION bin OPTIONAL) diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index d4293efb5a7ae..d3ff24749e91c 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -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 $ DESTINATION bin OPTIONAL) + endif() endif() endif() diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt index 533eedced8d7d..7c7a8e5200a9b 100644 --- a/src/csync/CMakeLists.txt +++ b/src/csync/CMakeLists.txt @@ -128,4 +128,8 @@ else() ) endif() +if (WIN32) + install(FILES $ DESTINATION bin OPTIONAL) +endif() + configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 9660bfb7ee7f2..014cfce4ca2fc 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -729,6 +729,9 @@ install(TARGETS nextcloud BUNDLE DESTINATION "." ) +if (WIN32) + install(FILES $ 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 diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt index 58d820a3412b1..a215432063677 100644 --- a/src/libsync/CMakeLists.txt +++ b/src/libsync/CMakeLists.txt @@ -271,5 +271,8 @@ else() install(TARGETS nextcloudsync DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS) endif() +if (WIN32) + install(FILES $ DESTINATION bin OPTIONAL) +endif() add_subdirectory(vfs) diff --git a/src/libsync/vfs/cfapi/CMakeLists.txt b/src/libsync/vfs/cfapi/CMakeLists.txt index f6b2084dc9111..860a1c2dae652 100644 --- a/src/libsync/vfs/cfapi/CMakeLists.txt +++ b/src/libsync/vfs/cfapi/CMakeLists.txt @@ -47,4 +47,6 @@ if (WIN32) LIBRARY DESTINATION "${vfs_installdir}" RUNTIME DESTINATION "${vfs_installdir}" ) + + install(FILES $ DESTINATION bin OPTIONAL) endif() diff --git a/src/libsync/vfs/cfapi/shellext/CMakeLists.txt b/src/libsync/vfs/cfapi/shellext/CMakeLists.txt index b884eac8ac706..e822afcc9a9c4 100644 --- a/src/libsync/vfs/cfapi/shellext/CMakeLists.txt +++ b/src/libsync/vfs/cfapi/shellext/CMakeLists.txt @@ -211,4 +211,6 @@ install(TARGETS CfApiShellExtensions LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR} ) +install(FILES $ DESTINATION bin OPTIONAL) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configvfscfapishellext.h.in ${CMAKE_CURRENT_BINARY_DIR}/configvfscfapishellext.h) diff --git a/src/libsync/vfs/suffix/CMakeLists.txt b/src/libsync/vfs/suffix/CMakeLists.txt index 2ded256ea1cfc..1106b0d42f469 100644 --- a/src/libsync/vfs/suffix/CMakeLists.txt +++ b/src/libsync/vfs/suffix/CMakeLists.txt @@ -40,3 +40,6 @@ install(TARGETS nextcloudsync_vfs_suffix RUNTIME DESTINATION "${vfs_installdir}" ) +if (WIN32) + install(FILES $ DESTINATION bin OPTIONAL) +endif() diff --git a/src/libsync/vfs/xattr/CMakeLists.txt b/src/libsync/vfs/xattr/CMakeLists.txt index 792e85acb23cb..9ddd0dedc44d5 100644 --- a/src/libsync/vfs/xattr/CMakeLists.txt +++ b/src/libsync/vfs/xattr/CMakeLists.txt @@ -54,4 +54,8 @@ if (LINUX) LIBRARY DESTINATION "${vfs_installdir}" RUNTIME DESTINATION "${vfs_installdir}" ) + + if (WIN32) + install(FILES $ DESTINATION bin OPTIONAL) + endif() endif()