Skip to content

Commit 142be91

Browse files
committed
cmake: Skip PDB install for interface target
1 parent 46719fa commit 142be91

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

cmake/Modules/ObsHelpers_Windows.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ function(export_target target)
234234
COMPONENT obs_libraries
235235
EXCLUDE_FROM_ALL)
236236

237-
if(MSVC)
237+
get_target_property(target_type ${target} TYPE)
238+
if(MSVC AND NOT target_type STREQUAL INTERFACE_LIBRARY)
238239
install(
239240
FILES $<TARGET_PDB_FILE:${target}>
240241
CONFIGURATIONS "RelWithDebInfo" "Debug"

cmake/windows/helpers.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,15 @@ function(target_export target)
274274
set(exclude_variant EXCLUDE_FROM_ALL)
275275
_target_export(${target})
276276

277-
install(
278-
FILES "$<TARGET_PDB_FILE:${target}>"
279-
CONFIGURATIONS RelWithDebInfo Debug Release
280-
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
281-
COMPONENT Development
282-
OPTIONAL)
277+
get_target_property(target_type ${target} TYPE)
278+
if(NOT target_type STREQUAL INTERFACE_LIBRARY)
279+
install(
280+
FILES "$<TARGET_PDB_FILE:${target}>"
281+
CONFIGURATIONS RelWithDebInfo Debug Release
282+
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
283+
COMPONENT Development
284+
OPTIONAL)
285+
endif()
283286
endfunction()
284287

285288
# Helper function to add resources into bundle

0 commit comments

Comments
 (0)