Skip to content

Commit

Permalink
cmake: Skip PDB install for interface target
Browse files Browse the repository at this point in the history
  • Loading branch information
tytan652 committed Jan 27, 2024
1 parent 46719fa commit 142be91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmake/Modules/ObsHelpers_Windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ function(export_target target)
COMPONENT obs_libraries
EXCLUDE_FROM_ALL)

if(MSVC)
get_target_property(target_type ${target} TYPE)
if(MSVC AND NOT target_type STREQUAL INTERFACE_LIBRARY)
install(
FILES $<TARGET_PDB_FILE:${target}>
CONFIGURATIONS "RelWithDebInfo" "Debug"
Expand Down
15 changes: 9 additions & 6 deletions cmake/windows/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,15 @@ function(target_export target)
set(exclude_variant EXCLUDE_FROM_ALL)
_target_export(${target})

install(
FILES "$<TARGET_PDB_FILE:${target}>"
CONFIGURATIONS RelWithDebInfo Debug Release
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
COMPONENT Development
OPTIONAL)
get_target_property(target_type ${target} TYPE)
if(NOT target_type STREQUAL INTERFACE_LIBRARY)
install(
FILES "$<TARGET_PDB_FILE:${target}>"
CONFIGURATIONS RelWithDebInfo Debug Release
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
COMPONENT Development
OPTIONAL)
endif()
endfunction()

# Helper function to add resources into bundle
Expand Down

0 comments on commit 142be91

Please sign in to comment.