2026-09-06 22:02:17 -07:00
|
|
|
# CMake macOS build dependencies module
|
|
|
|
|
#
|
|
|
|
|
# Adapted from obsproject/obs-plugintemplate. Only change from upstream: qt6
|
|
|
|
|
# is dropped from dependencies_list. This plugin's properties UI is plain
|
|
|
|
|
# obs_properties_*, it never links Qt, and the OBS sub-build is configured
|
|
|
|
|
# with ENABLE_UI=OFF -- so downloading a ~100 MB Qt bundle on every CI run
|
|
|
|
|
# would buy nothing.
|
|
|
|
|
|
|
|
|
|
include_guard(GLOBAL)
|
|
|
|
|
|
|
|
|
|
include(buildspec_common)
|
|
|
|
|
|
|
|
|
|
# _check_dependencies_macos: Set up macOS slice for _check_dependencies
|
|
|
|
|
function(_check_dependencies_macos)
|
|
|
|
|
set(arch universal)
|
|
|
|
|
set(platform macos)
|
|
|
|
|
|
|
|
|
|
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
|
|
|
|
|
|
|
|
|
|
set(dependencies_dir "${CMAKE_CURRENT_SOURCE_DIR}/.deps")
|
|
|
|
|
set(prebuilt_filename "macos-deps-VERSION-ARCH_REVISION.tar.xz")
|
|
|
|
|
set(prebuilt_destination "obs-deps-VERSION-ARCH")
|
|
|
|
|
set(obs-studio_filename "VERSION.tar.gz")
|
|
|
|
|
set(obs-studio_destination "obs-studio-VERSION")
|
|
|
|
|
set(dependencies_list prebuilt obs-studio)
|
|
|
|
|
|
|
|
|
|
_check_dependencies()
|
|
|
|
|
|
2026-09-06 22:18:41 -07:00
|
|
|
# Clearing the quarantine flag on the downloaded dependencies is a
|
|
|
|
|
# convenience, not a correctness requirement, so a failure here must not
|
|
|
|
|
# take the whole configure down with it. Upstream makes it fatal.
|
2026-09-06 22:02:17 -07:00
|
|
|
execute_process(
|
|
|
|
|
COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}"
|
|
|
|
|
RESULT_VARIABLE result
|
2026-09-06 22:18:41 -07:00
|
|
|
OUTPUT_QUIET
|
|
|
|
|
ERROR_QUIET
|
2026-09-06 22:02:17 -07:00
|
|
|
)
|
2026-09-06 22:18:41 -07:00
|
|
|
if(NOT result EQUAL 0)
|
|
|
|
|
message(STATUS "Could not clear the quarantine attribute under ${dependencies_dir} (continuing)")
|
|
|
|
|
endif()
|
2026-09-06 22:02:17 -07:00
|
|
|
|
|
|
|
|
list(APPEND CMAKE_FRAMEWORK_PATH "${dependencies_dir}/Frameworks")
|
|
|
|
|
set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} PARENT_SCOPE)
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
_check_dependencies_macos()
|