-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b36312
commit 2096308
Showing
6 changed files
with
366 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# SPDX-License-Identifier: MIT | ||
cmake_minimum_required(VERSION 3.19) | ||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "macOS deployment target") | ||
list(APPEND CMAKE_MODULE_PATH | ||
${CMAKE_CURRENT_LIST_DIR}/cmake | ||
${CMAKE_CURRENT_LIST_DIR}/../../cmake | ||
) | ||
|
||
set(LIBX264 "31e19f92f00c7003fa115047ce50978bc98c3a0d" CACHE STRING | ||
"The commit of libx264 to build") | ||
set(FFMPEG "7.0.1" CACHE STRING | ||
"The version of ffmpeg to build") | ||
option(KEEP_ARCHIVES "Keep downloaded archives instead of deleting them" OFF) | ||
option(KEEP_SOURCE_DIRS "Keep source directories instead of deleting them" OFF) | ||
option(KEEP_BINARY_DIRS "Keep build directories instead of deleting them" OFF) | ||
set(TARGET_ARCH "x86_64" CACHE STRING | ||
"Target architecture (x86, x86_64, arm32, arm64)") | ||
|
||
include(BuildDependency) | ||
|
||
if(LIBX264) | ||
build_dependency(x264 ${LIBX264} ${BUILD_TYPE} | ||
URL https://code.videolan.org/videolan/x264/-/archive/@version@/x264-@version@.tar.gz | ||
TARGET_ARCH "${TARGET_ARCH}" | ||
VERSIONS | ||
31e19f92f00c7003fa115047ce50978bc98c3a0d | ||
SHA384=bed835fcf11b4befa8341661b996c4f51842dfee6f7f87c9c2e767cebca0b7871a7f59435b4e92d89c2b13a659d1d737 | ||
ALL_PLATFORMS | ||
AUTOMAKE | ||
ASSIGN_PREFIX WIN32_CC_CL | ||
ALL | ||
--enable-static | ||
--enable-pic | ||
--disable-lavf | ||
--disable-swscale | ||
--disable-avs | ||
--disable-ffms | ||
--disable-gpac | ||
--disable-lsmash | ||
--disable-bashcompletion | ||
--disable-cli | ||
--enable-strip | ||
) | ||
endif() | ||
|
||
if(FFMPEG) | ||
set(ffmpeg_configure_args | ||
--enable-gpl | ||
--enable-version3 | ||
--disable-doc | ||
--disable-autodetect | ||
--disable-programs | ||
--disable-avdevice | ||
--disable-avfilter | ||
--disable-swresample | ||
--disable-postproc | ||
--disable-alsa | ||
--disable-appkit | ||
--disable-avfoundation | ||
--disable-bzlib | ||
--disable-coreimage | ||
--disable-iconv | ||
--disable-lzma | ||
--disable-metal | ||
--disable-sndio | ||
--disable-schannel | ||
--disable-sdl2 | ||
--disable-securetransport | ||
--disable-xlib | ||
--disable-zlib | ||
--enable-libx264 | ||
--disable-encoders | ||
--disable-decoders | ||
--disable-muxers | ||
--disable-demuxers | ||
--disable-parsers | ||
--disable-bsfs | ||
--disable-protocols | ||
--disable-indevs | ||
--disable-outdevs | ||
--disable-devices | ||
--disable-filters | ||
--enable-encoder=libx264 | ||
--enable-muxer=mp4 | ||
) | ||
if(WIN32) | ||
list(PREPEND ffmpeg_configure_args | ||
--toolchain=msvc | ||
--arch=${TARGET_ARCH} | ||
) | ||
endif() | ||
|
||
build_dependency(ffmpeg ${FFMPEG} ${BUILD_TYPE} | ||
URL https://ffmpeg.org/releases/ffmpeg-@version@.tar.xz | ||
TARGET_ARCH "${TARGET_ARCH}" | ||
VERSIONS | ||
7.0.1 | ||
SHA384=25650331f409bf7efc09f0d859ce9a1a8e16fe429e4f9b2593743eb68e723b186559739e8b02aac83c6e5c96137fec7e | ||
ALL_PLATFORMS | ||
AUTOMAKE | ||
ASSIGN_PREFIX | ||
MAKE_FLAGS "SHELL=C:/PROGRA~1/Git/bin/bash.exe" | ||
PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" | ||
ALL ${ffmpeg_configure_args} | ||
) | ||
endif() | ||
|
||
|
||
# https://code.videolan.org/videolan/x264/-/archive/31e19f92f00c7003fa115047ce50978bc98c3a0d/x264-31e19f92f00c7003fa115047ce50978bc98c3a0d.tar.gz | ||
# ./configure --enable-static --enable-pic --disable-lavf --disable-swscale --disable-avs --disable-ffms --disable-gpac --disable-lsmash --disable-bashcompletion --enable-strip --disable-cli --prefix=/home/carsten/Development/prefix | ||
|
||
|
||
# https://ffmpeg.org/releases/ffmpeg-7.0.1.tar.xz | ||
# ./configure --enable-gpl --enable-version3 --disable-doc --disable-autodetect --disable-programs --disable-avdevice --disable-avfilter --disable-swresample --disable-postproc --disable-alsa --disable-appkit --disable-avfoundation --disable-bzlib --disable-coreimage --disable-iconv --disable-lzma --disable-metal --disable-sndio --disable-schannel --disable-sdl2 --disable-securetransport --disable-xlib --disable-zlib --enable-libx264 --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-indevs --disable-outdevs --disable-devices --disable-filters --enable-encoder=libx264 --enable-muxer=mp4 --prefix=/home/carsten/Development/prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.