-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
66 lines (57 loc) · 2.1 KB
/
CMakeLists.txt
File metadata and controls
66 lines (57 loc) · 2.1 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.8)
project(ffmpeg4.0)
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
if (__APPLE__)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -v -stdlib=libc++ \
-framework OpenGL \
-framework AppKit \
-framework Security \
-framework CoreFoundation \
-framework CoreVideo \
-framework CoreMedia \
-framework QuartzCore \
-framework CoreFoundation \
-framework VideoDecodeAcceleration \
-framework Cocoa \
-framework AudioToolbox \
-framework VideoToolbox \
-framework OpenCL \
-I/usr/local/include \
-L/usr/local/lib/ \
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include \
-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/")
endif()
find_package(PkgConfig REQUIRED)
if(__APPLE__)
pkg_check_modules(ASS REQUIRED libass libpng x264 x265 opus liblzma fdk-aac vpx lame sdl gsm fontconfig)
else()
pkg_check_modules(ASS REQUIRED libavformat libavfilter libavutil libavcodec)
endif()
if(__APPLE__)
include_directories(
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/include
)
endif()
set(CMAKE_CXX_STANDARD 11)
if(__APPLE__)
set(FFMPEG_LIBS
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libavcodec.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libavdevice.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libavfilter.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libavformat.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libavutil.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libpostproc.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libswresample.a
${CMAKE_SOURCE_DIR}/../../ffmpeg-4.0.2/build/lib/libswscale.a
${ASS_LIBRARIES}
/usr/local/Cellar/freetype/2.8.1/lib/libfreetype.dylib
/usr/lib/libbz2.dylib
/usr/lib/libiconv.dylib
/usr/lib/libssl.dylib
/usr/lib/libz.dylib)
else()
set(FFMPEG_LIBS ${ASS_LIBRARIES})
endif()
add_subdirectory(version)
add_subdirectory(test)
add_subdirectory(filter)