Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit ca0bb9f

Browse files
committed
fix libaom linking error on mac catalyst
1 parent 12f5251 commit ca0bb9f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build/ios-libaom.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ case ${ARCH} in
6565
ARCH_OPTIONS="-DARCH_X86_64=1 -DENABLE_SSE4_1=1 -DHAVE_SSE4_2=1"
6666
;;
6767
x86-64-mac-catalyst)
68-
cp /Users/taner/Projects/mobile-ffmpeg/tools/cmake/libaom.x86_64-mac-catalyst.cmake ${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-mac-catalyst.cmake
68+
cp ${BASEDIR}/tools/cmake/libaom.x86_64-mac-catalyst.cmake ${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-mac-catalyst.cmake
6969
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-mac-catalyst.cmake"
70-
ARCH_OPTIONS="-DARCH_X86_64=0 -DENABLE_SSE=0 -DENABLE_SSE2=0 -DHAVE_SSE3=0 -DHAVE_SSE4_1=0 -DHAVE_SSE4_2=0 -DENABLE_MMX=0"
70+
ARCH_OPTIONS="-DARCH_X86_64=0 -DENABLE_SSE=0 -DENABLE_SSE2=0 -DENABLE_SSE3=0 -DENABLE_SSE4_1=0 -DENABLE_SSE4_2=0 -DENABLE_MMX=0 -DCONFIG_OS_SUPPORT=0 -DCONFIG_RUNTIME_CPU_DETECT=0"
7171
;;
7272
esac
7373

@@ -82,9 +82,11 @@ cd cmake-build
8282

8383
# Workaround to disable asm on mac catalyst
8484
if [ ${ARCH} == "x86-64-mac-catalyst" ]; then
85+
${SED_INLINE} 's/define aom_clear_system_state() aom_reset_mmx_state()/define aom_clear_system_state()/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/system_state.h
8586
${SED_INLINE} 's/ add_asm_library("aom_ports/#add_asm_library("aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
8687
${SED_INLINE} 's/ target_sources(aom_ports/#target_sources(aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
8788
else
89+
${SED_INLINE} 's/define aom_clear_system_state()/define aom_clear_system_state() aom_reset_mmx_state()/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/system_state.h
8890
${SED_INLINE} 's/#add_asm_library("aom_ports/ add_asm_library("aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
8991
${SED_INLINE} 's/#target_sources(aom_ports/ target_sources(aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
9092
fi

tools/cmake/libaom.x86_64-mac-catalyst.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set(CMAKE_SYSTEM_PROCESSOR "x86_64")
2121
set(CMAKE_OSX_ARCHITECTURES "x86_64")
2222

2323
set(CMAKE_SYSTEM_NAME "Darwin")
24-
set(CMAKE_OSX_SYSROOT macosx)
24+
set(CMAKE_OSX_SYSROOT ${SDK_PATH})
2525
set(CMAKE_C_COMPILER clang)
2626
set(CMAKE_C_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}")
2727
set(CMAKE_CXX_COMPILER clang++)

0 commit comments

Comments
 (0)