-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
55 lines (46 loc) · 915 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
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
cmake_minimum_required(VERSION 2.8)
project(librtmp C)
add_definitions(
-DUSE_OPENSSL
-D_CRT_SECURE_NO_WARNINGS
)
set(SRCS
librtmp/amf.h
librtmp/bytes.h
librtmp/dh.h
librtmp/dhgroups.h
librtmp/handshake.h
librtmp/http.h
librtmp/log.h
librtmp/rtmp.h
librtmp/rtmp_sys.h
librtmp/amf.c
librtmp/hashswf.c
librtmp/log.c
librtmp/parseurl.c
librtmp/rtmp.c
)
find_package(OpenSSL REQUIRED)
find_package(ZLib REQUIRED)
include_directories(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/librtmp
${OPENSSL_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
)
add_library(librtmp SHARED
${SRCS}
)
target_link_libraries(librtmp ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Ws2_32 winmm gdi32)
target_compile_options(
librtmp
PRIVATE -DEXPORT
)
set(DUMP_SRCS
rtmpdump/getopt.c
rtmpdump/rtmpdump.c
rtmpdump/stdafx.h
rtmpdump/targetver.h
)
add_executable(rtmpdump ${DUMP_SRCS})
target_link_libraries(rtmpdump librtmp)