forked from sambios/UsbCameraRtspServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (54 loc) · 1.61 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
cmake_minimum_required(VERSION 3.2)
project(ffmegH264RtspServer)
set(CMAKE_CXX_STANDARD 14)
add_definitions(-D__STDC_CONSTANT_MACROS)
message(STATUS "Home is $ENV{HOME}")
if (NOT DEFINED THIRD_PARTY_ROOT)
if (DEFINED ENV{THIRD_PARTY_ROOT})
set(THIRD_PARTY_ROOT $ENV{THIRD_PARTY_ROOT})
else ()
set(THIRD_PARTY_ROOT $ENV{THIRD_PARTY_ROOT}/main/third_party)
endif ()
endif ()
set(Live555_ROOT ${THIRD_PARTY_ROOT}/live555)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(LIB_ARCH_NAME x64-ubuntu18-gcc)
set(IS_LINUX 1)
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(LIB_ARCH_NAME mac)
set(IS_MAC 1)
endif ()
message(STATUS "live555_root=${Live555_ROOT}")
include_directories(${Live555_ROOT}/BasicUsageEnvironment/include
${Live555_ROOT}/UsageEnvironment/include
${Live555_ROOT}/liveMedia/include
${Live555_ROOT}/groupsock/include
${Live555_ROOT}/include
/usr/local/include
)
#link_libraries( ${OpenCV})
link_directories(
${Live555_ROOT}/${LIB_ARCH_NAME}/lib
/usr/local/lib
)
add_executable(ffmpegH264RtspServer
CameraDevice.cpp
FfmpegEncoder.cpp
FfmpegFrameSource.cpp
FfmpegH264LiveServerMediaSubsession.cpp
UsbCameraOnDemandRTSPServer.cpp
main.cpp
)
target_link_libraries(ffmpegH264RtspServer
liveMedia
BasicUsageEnvironment
UsageEnvironment
groupsock
avcodec
avformat
avutil
swscale
avfilter
avdevice
pthread
)