Skip to content

Commit

Permalink
add more libs
Browse files Browse the repository at this point in the history
  • Loading branch information
summeroff committed Jan 21, 2025
1 parent 40db1bf commit 1024017
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions libobs/cmake/os-windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,36 @@ target_link_options(libobs PRIVATE /IGNORE:4098 /SAFESEH:NO)
set_target_properties(libobs PROPERTIES PREFIX "" OUTPUT_NAME "obs")

if(NOT ENABLE_UI)
set(DEP_BINARIES
$<TARGET_FILE:FFmpeg::avcodec>
$<TARGET_FILE:FFmpeg::avformat>
$<TARGET_FILE:FFmpeg::avutil>
$<TARGET_FILE:FFmpeg::swscale>
$<TARGET_FILE:FFmpeg::swresample>
$<TARGET_FILE:FFmpeg::avfilter>
$<TARGET_FILE:FFmpeg::avdevice>

$<TARGET_FILE:FFmpeg::ffmpegexe>
$<TARGET_FILE:FFmpeg::ffprobeexe>

$<TARGET_FILE:Libx264::Libx264>
$<TARGET_FILE:ZLIB::ZLIB>
)
set(DEP_BINARIES
$<TARGET_FILE:FFmpeg::avcodec>
$<TARGET_FILE:FFmpeg::avformat>
$<TARGET_FILE:FFmpeg::avutil>
$<TARGET_FILE:FFmpeg::swscale>
$<TARGET_FILE:FFmpeg::swresample>
$<TARGET_FILE:FFmpeg::avfilter>
$<TARGET_FILE:FFmpeg::avdevice>
$<TARGET_FILE:FFmpeg::ffmpegexe>
$<TARGET_FILE:FFmpeg::ffprobeexe>
$<TARGET_FILE:Libx264::Libx264>

# zlib.lib (import library or static lib):
$<TARGET_FILE:ZLIB::ZLIB>

# zlib.dll (up one folder from 'lib', then into 'bin'):
"$<TARGET_FILE_DIR:ZLIB::ZLIB>/../bin/zlib.dll"
)

foreach(DEP_BINARY ${DEP_BINARIES})
message(STATUS "Adding custom command to copy ${DEP_BINARY} to ${OBS_EXECUTABLE_DESTINATION}")
foreach(DEP_BINARY ${DEP_BINARIES})
message(STATUS "Adding custom command to copy ${DEP_BINARY} to ${OBS_EXECUTABLE_DESTINATION}")

add_custom_command(TARGET libobs POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E echo "Copying dependencies binaries ${DEP_BINARY} to ${OBS_EXECUTABLE_DESTINATION}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${DEP_BINARY}" "${OBS_EXECUTABLE_DESTINATION}"
COMMENT "."
VERBATIM COMMAND_EXPAND_LISTS
)
endforeach()

add_custom_command(TARGET libobs POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E echo "Copying dependencies binaries ${DEP_BINARY} to ${OBS_EXECUTABLE_DESTINATION}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${DEP_BINARY}" "${OBS_EXECUTABLE_DESTINATION}"
COMMENT "."
VERBATIM COMMAND_EXPAND_LISTS)
endforeach()
install(FILES ${DEP_BINARIES} DESTINATION ${OBS_EXECUTABLE_DESTINATION})

install(FILES ${DEP_BINARIES} DESTINATION ${OBS_EXECUTABLE_DESTINATION})
endif()

0 comments on commit 1024017

Please sign in to comment.