-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
31 lines (27 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Standalone cmake project to build and install ffmpeg dependencies for Scintillator
include(ExternalProject)
cmake_policy(SET CMP0048 NEW)
cmake_minimum_required(VERSION 3.9)
project(ffmpeg-dev VERSION 0.0.1)
set(INSTALL_EXT_DIR "${PROJECT_BINARY_DIR}/install-ext" CACHE PATH "")
file(MAKE_DIRECTORY "${INSTALL_EXT_DIR}")
if(APPLE)
# TODO: Build parallelism is turned off right now because Travis inconsistently fails builds with too many child
# processes spawned. So this build is serialized to be more stable. It also means that it is much slower than it needs
# to be. Find a way to turn it back on.
set(SCIN_FFMPEG_BUILD make)
else()
set(SCIN_FFMPEG_BUILD make -j)
endif()
ExternalProject_Add(ffmpeg
PREFIX ext
STEP_TARGETS install
GIT_REPOSITORY ${SCIN_FFMPEG_GIT_REPO}
GIT_TAG ${SCIN_FFMPEG_GIT_TAG}
GIT_PROGRESS ON
UPDATE_COMMAND ""
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./configure --prefix=${INSTALL_EXT_DIR} --enable-gpl --disable-programs --enable-shared
BUILD_COMMAND ${SCIN_FFMPEG_BUILD}
INSTALL_COMMAND make install
)