-
Notifications
You must be signed in to change notification settings - Fork 106
/
CMakeLists.txt
29 lines (20 loc) · 830 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
project(webrtc_server)
set(CMAKE_CXX_STANDARD 17)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
add_compile_options(-g)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB RTC_LIST ./rtc/*.cc ./common/*.cc ./net/*.cc ./session/*.cc ./rtp/*.cc)
add_library(rtc ${RTC_LIST})
set(LINK_LIBRARYS
srtp2
ssl
crypto
dl pthread )
set(RTC_LIBRARYS rtc muduo_http muduo_net muduo_base)
add_executable(rtp_src_example ./example/rtp_src_example.cc)
target_link_libraries(rtp_src_example ${RTC_LIBRARYS} ${LINK_LIBRARYS} avformat avcodec avutil)
add_executable(publish ./example/publish.cc)
target_link_libraries(publish ${RTC_LIBRARYS} ${LINK_LIBRARYS} avformat avcodec avutil)