mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add workaround for MacOS build issue
This commit is contained in:
parent
84e01c0c9c
commit
dc91ee0cf1
|
|
@ -4,6 +4,36 @@ include_guard(GLOBAL)
|
|||
|
||||
include(buildspec_common)
|
||||
|
||||
# Hacky workaround to ensure all libobs headers are available at build time
|
||||
function(_check_for_libobs_headers)
|
||||
set(dependencies_dir "${CMAKE_CURRENT_SOURCE_DIR}/.deps")
|
||||
|
||||
set(headers_to_copy "util/config-file.h" "util/platform.h"
|
||||
"graphics/matrix4.h" "graphics/axisang.h")
|
||||
|
||||
foreach(header IN LISTS headers_to_copy)
|
||||
set(libobs_header_location
|
||||
"${dependencies_dir}/Frameworks/libobs.framework/Versions/A/Headers/${header}"
|
||||
)
|
||||
|
||||
if(EXISTS ${libobs_header_location})
|
||||
continue()
|
||||
endif()
|
||||
|
||||
string(
|
||||
JSON
|
||||
version
|
||||
GET
|
||||
${buildspec}
|
||||
dependencies
|
||||
obs-studio
|
||||
version)
|
||||
set(input_file "${dependencies_dir}/obs-studio-${version}/libobs/${header}")
|
||||
message(STATUS "Will copy ${input_file} to ${libobs_header_location} ...")
|
||||
configure_file(${input_file} ${libobs_header_location} COPYONLY)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# _check_dependencies_macos: Set up macOS slice for _check_dependencies
|
||||
function(_check_dependencies_macos)
|
||||
set(arch universal)
|
||||
|
|
@ -32,3 +62,4 @@ function(_check_dependencies_macos)
|
|||
endfunction()
|
||||
|
||||
_check_dependencies_macos()
|
||||
_check_for_libobs_headers()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user