-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
66 lines (48 loc) · 2.06 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
cmake_minimum_required(VERSION 3.6.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
project("Rev-Lib-WebRTC")
find_library(log-lib log)
set(REV_LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs)
include_directories(${REV_LIBS_DIR}/rev_json)
add_library(rev_lib_data_channel SHARED IMPORTED)
set_target_properties(rev_lib_data_channel PROPERTIES IMPORTED_LOCATION
${REV_LIBS_DIR}/libdatachannel/lib/${ANDROID_ABI}/libdatachannel.so)
set(REV_CLIENT_SRCS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/rev_client)
set(REV_CLIENT_SRCS
${REV_CLIENT_SRCS_SOURCE_DIR}/main.cpp
${REV_CLIENT_SRCS_SOURCE_DIR}/rev_client_init.hpp
${REV_CLIENT_SRCS_SOURCE_DIR}/rev_client_init.cpp
${REV_CLIENT_SRCS_SOURCE_DIR}/parse_cl.cpp
${REV_CLIENT_SRCS_SOURCE_DIR}/parse_cl.h
)
add_library(rev_client SHARED ${REV_CLIENT_SRCS})
target_link_libraries(
rev_client
rev_lib_data_channel
${log-lib})
target_include_directories(rev_client
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/rev_pers_lib/rev_client
PUBLIC ${REV_LIBS_DIR}/libdatachannel/include
PUBLIC ${REV_LIBS_DIR}/rev_json
)
add_library( # Sets the name of the library.
Rev-Lib-WebRTC
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/Rev-Lib-WebRTC.hpp
${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/Rev-Lib-WebRTC.cpp)
target_include_directories(Rev-Lib-WebRTC
PUBLIC ${REV_LIBS_DIR}/libdatachannel/include
PUBLIC ${REV_LIBS_DIR}/rev_json
)
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
Rev-Lib-WebRTC
rev_lib_data_channel
rev_client
# Links the target library to the log library
# included in the NDK.
${log-lib})