forked from vapoursynth/subtext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (27 loc) · 1 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
cmake_minimum_required(VERSION 3.15) # for cmake policy CMP0091 https://cmake.org/cmake/help/latest/policy/CMP0091.html#policy:CMP0091
project(subtext)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_VISIBILITY_PRESET hidden)
include(FetchContent)
FetchContent_Declare(VapourSynth
URL https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R55-API4-RC3.zip
URL_HASH MD5=2352CD4FD2DEEA88A9495279820AC2A0)
FetchContent_MakeAvailable(VapourSynth)
find_package(Iconv REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBAV REQUIRED
libavcodec
libavformat
libavutil
)
pkg_check_modules(LIBASS REQUIRED libass>=0.12.0)
add_library(subtext SHARED
"src/common.c"
"src/image.cpp"
"src/text.c"
"src/toass.cpp"
"src/toutf8.c"
)
target_include_directories(subtext PRIVATE "${vapoursynth_SOURCE_DIR}/include" ${LIBAV_INCLUDE_DIRS} ${LIBASS_INCLUDE_DIRS})
target_link_libraries(subtext PRIVATE Iconv::Iconv ${LIBAV_LINK_LIBRARIES} ${LIBASS_LINK_LIBRARIES})