-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
117 lines (96 loc) · 2.17 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#
# CMakeLists.txt
#
# Copyright (C) 2023 Sebastian Reimers
#
# #############################################################################
#
# Project and Versioning
#
cmake_minimum_required(VERSION 3.14)
set(CMAKE_C_COMPILER clang)
project(
studiolink
VERSION 24.1.0
LANGUAGES C)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
# #############################################################################
#
# Compile options
#
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 11)
if(MSVC)
add_compile_options("/W3")
else()
add_compile_options(
-pedantic
-Wall
-Wbad-function-cast
-Wcast-align
-Wextra
-Wmissing-declarations
-Wmissing-prototypes
-Wnested-externs
-Wno-strict-aliasing
-Wold-style-definition
-Wshadow
-Waggregate-return
-Wstrict-prototypes
-Wuninitialized
-Wvla)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(
-Wshorten-64-to-32
-Watomic-implicit-seq-cst
-Wno-gnu-zero-variadic-macro-arguments
)
endif()
# #############################################################################
#
# Subdirectory section
#
# target environment on the build host system
set(CMAKE_FIND_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/third_party
${CMAKE_CURRENT_SOURCE_DIR}/external)
# modify default behavior of FIND_XXX() commands
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
if(${CMAKE_BUILD_TYPE} MATCHES "[Rr]el" AND NOT UNIX)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()
set(RE_LIBRARY
re
CACHE STRING "")
set(LIBRE_BUILD_SHARED
OFF
CACHE STRING "")
set(STATIC
ON
CACHE BOOL "")
set(MODULES
alsa
auconv
auresamp
vp8
coreaudio
dtls_srtp
g711
ice
jack
netroam
opus
portaudio
pulse
turn
CACHE STRING "")
# Baresip dependencies
add_subdirectory(external/re EXCLUDE_FROM_ALL)
add_subdirectory(external/baresip EXCLUDE_FROM_ALL)
# Studio Link
find_package(re CONFIG REQUIRED)
add_compile_definitions(SL_VERSION="${PROJECT_VERSION}")
add_subdirectory(libsl)
add_subdirectory(test)
add_subdirectory(app/cli)