-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
87 lines (70 loc) · 1.51 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
cmake_minimum_required(VERSION 3.22...3.25)
option(ENABLE_RTSP "Enable RTSP source support" ON)
if(NOT ENABLE_RTSP)
target_disable(obs-rtsp)
return()
endif()
find_package(
FFmpeg REQUIRED
COMPONENTS avcodec
avfilter
avdevice
avutil
swscale
avformat
swresample)
add_library(obs-rtsp MODULE)
add_library(OBS::rtsp ALIAS obs-rtsp)
# live555
add_subdirectory(deps/live555)
set(LIVE555 deps/live555/live)
target_include_directories(
obs-rtsp
PRIVATE
# live555 includes
${LIVE555}/groupsock/include
${LIVE555}/liveMedia/include
${LIVE555}/UsageEnvironment/include
${LIVE555}/BasicUsageEnvironment/include
${LIVE555}/../include
)
target_sources(
obs-rtsp
PRIVATE
obs-rtsp.cpp
# source
src/rtsp_source.h
src/rtsp_source.cpp
# output
src/rtsp_output.h
src/rtsp_output.cpp
# utils
src/utils/utils.h
src/utils/utils.cpp
src/utils/video_utils.h
src/utils/h264/h264_common.h
src/utils/h264/h264_common.cpp
src/utils/h265/h265_common.h
src/utils/h265/h265_common.cpp
# server
src/server/rtsp_server.h
src/server/rtsp_server.cpp
# client
src/client/rtsp_client.h
src/client/rtsp_client.cpp
)
target_link_libraries(
obs-rtsp
PRIVATE
OBS::libobs
liblive555helper
# ffmpeg
FFmpeg::avcodec
FFmpeg::avfilter
FFmpeg::avformat
FFmpeg::avdevice
FFmpeg::avutil
FFmpeg::swscale
FFmpeg::swresample
)
set_target_properties_obs(obs-rtsp PROPERTIES FOLDER plugins/obs-rtsp PREFIX "")