-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
46 lines (36 loc) · 1.37 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
# Project
cmake_minimum_required(VERSION 3.2)
project(rawrtc-datachannel-pipe
VERSION 0.0.1)
set(PROJECT_DESCRIPTION
"A tool for piping data over a WebRTC DataChannel using the alsome RawRTC WebRTC implementation")
set(PROJECT_URL
"https://github.com/kpe/rawrtc-datachanel-pipe")
set(VERSION_LIB_RE "libre >= 0.5.0")
set(VERSION_LIB_RAWRTC "librawrtc >= 0.2.2")
# Debug build type as default
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, using DEBUG")
set(CMAKE_BUILD_TYPE "RELEASE")
endif()
# Enable verbose output in DEBUG mode
if (${CMAKE_BUILD_TYPE} MATCHES "DEBUG")
message(STATUS "enabling verbose outout")
set(CMAKE_VERBOSE_MAKEFILE on)
endif()
# Use pkg-config
find_package(PkgConfig REQUIRED)
# Dependency list
set(dc_pipe_DEP_LIBRARIES)
# Dependency: libre
pkg_check_modules(LIB_RE REQUIRED ${VERSION_LIB_RE})
include_directories(${LIB_RE_STATIC_INCLUDE_DIRS} ${LIB_RE_STATIC_INCLUDEDIR})
link_directories(${LIB_RE_STATIC_LIBRARY_DIRS})
list(APPEND dc_pipe_DEP_LIBRARIES ${LIB_RE_STATIC_LIBRARIES})
# Dependency: librawrtc
pkg_check_modules(LIB_RAWRTC REQUIRED ${VERSION_LIB_RAWRTC})
include_directories(${LIB_RAWRTC_INCLUDE_DIRS} ${LIB_RAWRTC_STATIC_INCLUDEDIR})
link_directories(${LIB_RAWRTC_LIBRARY_DIRS})
list(APPEND dc_pipe_DEP_LIBRARIES ${LIB_RAWRTC_LIBRARIES})
# Walk through subdirectories
add_subdirectory(src)