mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 05:17:19 +00:00
build: build static-only FFmpeg for macOS deps
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
deps/FFMPEG/FFMPEG.cmake
vendored
11
deps/FFMPEG/FFMPEG.cmake
vendored
@@ -23,9 +23,12 @@ if (MSVC)
|
|||||||
else ()
|
else ()
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(_minos_cmd
|
set(_minos_cmd
|
||||||
"CFLAGS=-mmacosx-version-min=${DEP_OSX_TARGET}"
|
"--extra-cflags=-mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
"LDFLAGS=-mmacosx-version-min=${DEP_OSX_TARGET}"
|
"--extra-ldflags=-mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
)
|
)
|
||||||
|
# Static FFmpeg: nothing to bundle into the .app, no rpath handling.
|
||||||
|
# Shared flags must come AFTER --enable-shared below so they win.
|
||||||
|
set(_link_cmd --enable-static --disable-shared)
|
||||||
if (IS_CROSS_COMPILE)
|
if (IS_CROSS_COMPILE)
|
||||||
set(_cross_cmd --enable-cross-compile)
|
set(_cross_cmd --enable-cross-compile)
|
||||||
set(_pic_cmd --enable-pic)
|
set(_pic_cmd --enable-pic)
|
||||||
@@ -37,6 +40,8 @@ else ()
|
|||||||
set(_cc_cmd "--cc=clang -arch x86_64")
|
set(_cc_cmd "--cc=clang -arch x86_64")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
else ()
|
||||||
|
set(_link_cmd --enable-shared)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(_build_j -j)
|
set(_build_j -j)
|
||||||
@@ -55,6 +60,8 @@ else ()
|
|||||||
${_cc_cmd}
|
${_cc_cmd}
|
||||||
"--prefix=${DESTDIR}"
|
"--prefix=${DESTDIR}"
|
||||||
--enable-shared
|
--enable-shared
|
||||||
|
${_link_cmd}
|
||||||
|
${_minos_cmd}
|
||||||
--disable-doc
|
--disable-doc
|
||||||
--enable-small
|
--enable-small
|
||||||
--disable-outdevs
|
--disable-outdevs
|
||||||
|
|||||||
Reference in New Issue
Block a user