Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cmake/Modules/ObsHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,13 @@ function(export_target target)
COMPONENT obs_libraries
${_EXCLUDE})

include(GenerateExportHeader)
generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
get_target_property(target_type ${target} TYPE)
if(NOT target_type STREQUAL INTERFACE_LIBRARY)
include(GenerateExportHeader)
generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)

target_sources(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
target_sources(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
endif()

set(TARGETS_EXPORT_NAME "${target}Targets")
include(CMakePackageConfigHelpers)
Expand Down
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