ci: install only libobs from the OBS sub-build
Build / macOS (macos-latest) (push) Failing after 16s
Build / Linux (ubuntu-24.04) (push) Successful in 58s
Build / Windows (windows-latest) (push) Failing after 9m2s

macOS got all the way through this time: the synthesised SDK path satisfied
OBS's version check, the sub-build configured, and libobs built and installed
-- libobs.framework with its headers, libobsConfig.cmake and
libobsTargets.cmake all landed. Then the install failed on the NEXT
subproject:

  file INSTALL cannot find ".../UI/obs-frontend-api/obs-frontend-api.dylib":
  No such file or directory

Installing from the top-level build directory walks every subproject's
cmake_install.cmake, and obs-frontend-api is a target this build deliberately
never builds -- that is the whole point of dropping Qt. Pointing --install at
the libobs subdirectory installs exactly what find_package(libobs) needs and
nothing else.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
2026-09-06 22:15:44 -07:00
co-authored by Claude Sonnet 5
parent 6b12859887
commit a910d22870
+16 -1
View File
@@ -20,6 +20,10 @@
# branch: a runner with only the Command Line Tools has no xcodebuild.
# 5. Generator flags are built as CMake lists so each becomes its own argv
# entry, rather than upstream's space-separated strings passed unquoted.
# 6. The install step targets the libobs subdirectory rather than the whole
# build tree, so it does not trip over the install rules of targets that
# were deliberately never built.
# 7. _resolve_versioned_macos_sdk exists at all -- see its own comment.
#
include_guard(GLOBAL)
@@ -207,10 +211,21 @@ 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:
#
# 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.
message(STATUS "Install ${label} (${arch})")
execute_process(
COMMAND
"${CMAKE_COMMAND}" --install build_${arch} --component Development --config Release --prefix "${dependencies_dir}"
"${CMAKE_COMMAND}" --install build_${arch}/libobs --component Development --config Release --prefix
"${dependencies_dir}"
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
RESULT_VARIABLE _process_result
COMMAND_ERROR_IS_FATAL ANY