optionally install PDB files when building them
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 3 Dec 2024 13:45:59 +0000 (14:45 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 12 Dec 2024 09:46:54 +0000 (09:46 +0000)
would allow installing PDB files when doing Windows builds producing
debug symbols

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
shell_integration/windows/NCContextMenu/CMakeLists.txt
shell_integration/windows/NCOverlays/CMakeLists.txt
src/cmd/CMakeLists.txt
src/csync/CMakeLists.txt
src/gui/CMakeLists.txt
src/libsync/CMakeLists.txt
src/libsync/vfs/cfapi/CMakeLists.txt
src/libsync/vfs/cfapi/shellext/CMakeLists.txt
src/libsync/vfs/suffix/CMakeLists.txt
src/libsync/vfs/xattr/CMakeLists.txt

index 43d60d1b03358ddd22ca2e3c10bd1d46759c72b8..4e76bb5396233aa78f78b4b8a4ea4cd2d62827d8 100644 (file)
@@ -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)
index 3b141138a632ed2c87e1ef8d5d6f85086aa4111f..4c1f5e83de6cf10b95e915b6eed18d38bf3f6481 100644 (file)
@@ -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)
index d4293efb5a7aeacad427dfccc2081c1ac0b29736..d3ff24749e91cf8773f5d79a3fa001f367b9ec1f 100644 (file)
@@ -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()
index 533eedced8d7da28876402c7d450da75e59a5052..7c7a8e5200a9b297431b13b7e2f73bded3b22fd1 100644 (file)
@@ -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)
index 9660bfb7ee7f287e070f51bd3312a9ef28cf4306..014cfce4ca2fccf3468f73e4f5e682cd42195e38 100644 (file)
@@ -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
index 58d820a3412b13c7dbc4f77a94d05c331f94eb53..a215432063677148a519e83b4e42aa0b00cdd9c1 100644 (file)
@@ -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)
index f6b2084dc911152f3c28c61fb8d3631a66c3bae4..860a1c2dae652e37e8be4dce7cc57d27314d0b0c 100644 (file)
@@ -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()
index b884eac8ac70645122e3f059824ec505cd8f2a54..e822afcc9a9c4124a35551173ca35f5e73b243cb 100644 (file)
@@ -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)
index 2ded256ea1cfc367a592d23ddb7aa8dc85e29874..1106b0d42f4690bc65ebe9f046171be2297b4512 100644 (file)
@@ -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()
index 792e85acb23cbb83daa1b0a04d7975e9ed3aa1db..9ddd0dedc44d5b914a7d4cbbe26dc79b6a9c8660 100644 (file)
@@ -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()