-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 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
32
cmake_minimum_required(VERSION 3.10)
project(HLSClientCPP)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Add executable targets
add_executable(hls_server src/hls_server.cpp)
add_executable(hls_client src/hls_client.cpp)
# civetweb
add_library(civetweb STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/civetweb.c)
target_include_directories(
civetweb PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_compile_options(civetweb PRIVATE -DNO_SSL)
target_link_libraries(hls_server PRIVATE civetweb)
# hls_client target: Find and link libavformat
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavformat)
target_include_directories(hls_client PRIVATE ./include)
target_link_libraries(hls_client PRIVATE PkgConfig::LIBAV)
target_link_libraries(hls_client PRIVATE civetweb)
# hls_server target
target_include_directories(hls_server PRIVATE include)
target_compile_options(hls_server PRIVATE -Wall -Wdeprecated-declarations -DNO_SSL)