浏览代码

CMake: Fix PDB install directory for library installation

obs-plugintemplate uses the `obs_libraries` component to install
obs components required for plugin development. The need of the separate
`pdbs` directory was removed a while ago (as PDB target installation
can be flagged as `OPTIONAL` and enabled for specific configurations
only). This part was overlooked in that change.
PatTheMav 3 年之前
父节点
当前提交
15b6128d09
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      cmake/Modules/ObsHelpers_Windows.cmake

+ 3 - 3
cmake/Modules/ObsHelpers_Windows.cmake

@@ -210,11 +210,11 @@ function(export_target target)
 
 
   if(MSVC)
   if(MSVC)
     install(
     install(
-      DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pdbs/"
+      FILES $<TARGET_PDB_FILE:${target}>
+      CONFIGURATIONS "RelWithDebInfo" "Debug"
       DESTINATION "${OBS_EXECUTABLE_EXPORT_DESTINATION}"
       DESTINATION "${OBS_EXECUTABLE_EXPORT_DESTINATION}"
-      CONFIGURATIONS Debug RelWithDebInfo
       COMPONENT obs_libraries
       COMPONENT obs_libraries
-      EXCLUDE_FROM_ALL)
+      OPTIONAL EXCLUDE_FROM_ALL)
   endif()
   endif()
 
 
   include(GenerateExportHeader)
   include(GenerateExportHeader)