-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (45 loc) · 1.4 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.10)
# set the project name and version
project(SimpleRush VERSION 1.0)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
if (ENABLE_ASAN)
set(CMAKE_C_FLAGS "-fsanitize=address ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-fsanitize=address ${CMAKE_CXX_FLAGS}")
endif()
# set up dependencies
find_package(Libev REQUIRED)
include_directories(${LIBEV_INCLUDE_DIRS})
find_package(ngtcp2 REQUIRED)
include_directories(${NGTCP2_INCLUDE_DIRS})
# we need the quic fork of openssl
find_package(OpenSSL 1.1.1)
if (OPENSSL_FOUND)
message (STATUS "OpenSSL found.")
message (STATUS "OpenSSL include directories: ${OPENSSL_INCLUDE_DIR}")
message (STATUS "OpenSSL library: ${OPENSSL_LIBRARIES}")
message (STATUS "OpenSSL version: ${OPENSSL_VERSION_STR}")
else()
message (FATAL_ERROR "OpenSSL not found.")
endif()
include(CheckSymbolExists)
check_symbol_exists(SSL_is_quic "openssl/ssl.h" HAVE_SSL_IS_QUIC)
# Set up libraries
add_subdirectory(flv)
add_subdirectory(lib)
enable_testing()
add_subdirectory(tests)
add_executable(flv_to_rush flv_to_rush)
target_link_libraries(flv_to_rush
rush
rush_flv)
add_executable(flv_to_rush_stream flv_to_rush_stream)
target_link_libraries(flv_to_rush_stream
OpenSSL::SSL
${NGTCP2_LIBRARIES}
${NGTCP2_CRYPTO_LIBRARY}
${LIBEV_LIBRARIES}
rush
rush_flv)