|
|
|
@@ -163,11 +163,19 @@ function(_setup_obs_studio)
|
|
|
|
|
|
|
|
|
|
if(OS_WINDOWS)
|
|
|
|
|
set(_cmake_generator "${CMAKE_GENERATOR}")
|
|
|
|
|
if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
|
|
|
|
|
list(APPEND _cmake_arch -A "${arch},version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
|
|
|
|
|
else()
|
|
|
|
|
# Plain "-A x64", NOT upstream's "-A x64,version=<Windows SDK>". With a
|
|
|
|
|
# current CMake the ",version=" suffix comes back out verbatim in the
|
|
|
|
|
# sub-build's CMAKE_VS_PLATFORM_NAME, and obs-studio's OWN dependency
|
|
|
|
|
# downloader keys its release assets off that value -- so the sub-configure
|
|
|
|
|
# goes looking for a file that cannot exist:
|
|
|
|
|
#
|
|
|
|
|
# string sub-command JSON member 'hashes windows-x64,version=10.0.26100.0'
|
|
|
|
|
# not found
|
|
|
|
|
# Unable to download .../windows-deps-2023-11-03-x64,version=10.0.26100.0.zip
|
|
|
|
|
#
|
|
|
|
|
# The Windows SDK is selected automatically anyway ("Selecting Windows SDK
|
|
|
|
|
# version 10.0.26100.0"), and CMAKE_SYSTEM_VERSION is passed below.
|
|
|
|
|
list(APPEND _cmake_arch -A "${arch}")
|
|
|
|
|
endif()
|
|
|
|
|
list(APPEND _cmake_extra "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}")
|
|
|
|
|
elseif(OS_MACOS)
|
|
|
|
|
# Ninja, not upstream's Xcode generator. A runner with only the Command
|
|
|
|
@@ -216,25 +224,38 @@ function(_setup_obs_studio)
|
|
|
|
|
)
|
|
|
|
|
message(STATUS "Build ${label} (Release - ${arch}) - done")
|
|
|
|
|
|
|
|
|
|
# Install only libobs's own rules, not the whole build tree's. Installing
|
|
|
|
|
# from the top-level build directory walks every subproject's
|
|
|
|
|
# cmake_install.cmake, including UI/obs-frontend-api's, which then fails on
|
|
|
|
|
# a binary that was deliberately never built:
|
|
|
|
|
# Install the whole build tree, and tolerate a non-zero exit.
|
|
|
|
|
#
|
|
|
|
|
# Installing from the top-level build directory walks every subproject's
|
|
|
|
|
# cmake_install.cmake, including UI/obs-frontend-api's, which fails on a
|
|
|
|
|
# binary this build deliberately never produced (that is the whole point of
|
|
|
|
|
# dropping Qt):
|
|
|
|
|
#
|
|
|
|
|
# file INSTALL cannot find ".../obs-frontend-api.dylib": No such file
|
|
|
|
|
#
|
|
|
|
|
# Pointing --install at the libobs subdirectory installs the framework /
|
|
|
|
|
# import library, the headers, and libobsConfig.cmake + libobsTargets.cmake
|
|
|
|
|
# -- everything find_package(libobs) needs -- and nothing else.
|
|
|
|
|
# Restricting --install to the libobs subdirectory avoids that error, but
|
|
|
|
|
# then the per-configuration export file (libobsTargets-release.cmake) never
|
|
|
|
|
# lands, and every consumer fails with "IMPORTED_LOCATION or IMPORTED_IMPLIB
|
|
|
|
|
# not set for imported target OBS::libobs configuration Release". So run the
|
|
|
|
|
# full install exactly as upstream does, let it get through libobs, and
|
|
|
|
|
# ignore the error it hits afterwards. If libobs really did not install, the
|
|
|
|
|
# find_package(libobs) in the top-level CMakeLists is where that surfaces --
|
|
|
|
|
# loudly, and with a far more useful message than a half-installed tree.
|
|
|
|
|
message(STATUS "Install ${label} (${arch})")
|
|
|
|
|
execute_process(
|
|
|
|
|
COMMAND
|
|
|
|
|
"${CMAKE_COMMAND}" --install build_${arch}/libobs --component Development --config Release --prefix
|
|
|
|
|
"${dependencies_dir}"
|
|
|
|
|
"${CMAKE_COMMAND}" --install build_${arch} --component Development --config Release --prefix "${dependencies_dir}"
|
|
|
|
|
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
|
|
|
|
|
RESULT_VARIABLE _process_result
|
|
|
|
|
COMMAND_ERROR_IS_FATAL ANY
|
|
|
|
|
RESULT_VARIABLE _install_result
|
|
|
|
|
OUTPUT_QUIET
|
|
|
|
|
)
|
|
|
|
|
if(NOT _install_result EQUAL 0)
|
|
|
|
|
message(
|
|
|
|
|
STATUS
|
|
|
|
|
"Install ${label} (${arch}) reported errors; expected, because install rules exist for "
|
|
|
|
|
"targets this build skips. Continuing -- find_package(libobs) is the real check."
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
message(STATUS "Install ${label} (${arch}) - done")
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|