Skip to content

Commit

Permalink
libobs: Fix Windows x86 CMake when using reduced obs-deps package
Browse files Browse the repository at this point in the history
A recent obs-deps change removed all non-essential x86 deps. This caused
the x86 subproject(s) on Windows to fail to configure due to being
unable to find x86 dependencies that do not exist.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
  • Loading branch information
RytoEX and PatTheMav committed Aug 28, 2024
1 parent cba6ed4 commit f0d6195
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ legacy_check()

include(cmake/obs-version.cmake)

if(OS_WINDOWS AND NOT OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_GENERATOR_PLATFORM)
include(cmake/os-windows.cmake)
return()
endif()

find_package(Threads REQUIRED)

find_package(FFmpeg 6.1 REQUIRED avformat avutil swscale swresample OPTIONAL_COMPONENTS avcodec)
Expand Down
4 changes: 4 additions & 0 deletions libobs/cmake/os-windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ if(NOT TARGET OBS::w32-pthreads)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/w32-pthreads" "${CMAKE_BINARY_DIR}/deps/w32-pthreads")
endif()

if(NOT OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_GENERATOR_PLATFORM)
return()
endif()

configure_file(cmake/windows/obs-module.rc.in libobs.rc)

target_sources(
Expand Down

0 comments on commit f0d6195

Please sign in to comment.