2016-12-23 09:17:31 -08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project(libcaption)
|
|
|
|
add_definitions(-D__STDC_CONSTANT_MACROS)
|
|
|
|
if (WIN32)
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
2019-10-07 04:57:54 -07:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
add_compile_options("-fPIC")
|
|
|
|
endif()
|
|
|
|
|
2016-12-23 09:17:31 -08:00
|
|
|
# Don't need to prefix local includes with "caption/*"
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/caption)
|
|
|
|
|
|
|
|
set(CAPTION_SOURCES
|
|
|
|
src/utf8.c
|
|
|
|
src/srt.c
|
|
|
|
src/scc.c
|
2018-06-28 11:22:44 -07:00
|
|
|
src/mpeg.c
|
2016-12-23 09:17:31 -08:00
|
|
|
src/cea708.c
|
2018-06-28 11:22:44 -07:00
|
|
|
src/xds.c
|
2016-12-23 09:17:31 -08:00
|
|
|
src/caption.c
|
|
|
|
src/eia608_charmap.c
|
2018-06-28 11:22:44 -07:00
|
|
|
src/eia608_from_utf8.c
|
2016-12-23 09:17:31 -08:00
|
|
|
src/eia608.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CAPTION_HEADERS
|
|
|
|
caption/utf8.h
|
|
|
|
caption/scc.h
|
2018-06-28 11:22:44 -07:00
|
|
|
caption/mpeg.h
|
2016-12-23 09:17:31 -08:00
|
|
|
caption/cea708.h
|
|
|
|
caption/eia608.h
|
|
|
|
caption/caption.h
|
|
|
|
caption/eia608_charmap.h
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(caption STATIC ${CAPTION_SOURCES})
|
2020-09-08 13:23:49 -07:00
|
|
|
set_target_properties(caption PROPERTIES
|
|
|
|
FOLDER "deps"
|
|
|
|
POSITION_INDEPENDENT_CODE ON)
|