-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
156 lines (141 loc) · 3.99 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
cmake_minimum_required(VERSION 3.10)
project(dingdong C CXX)
set(RASPBERRY_PI OFF)
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^arm")
set(RASPBERRY_PI ON)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdouble-promotion -Wnon-virtual-dtor -Wnull-dereference -Wold-style-cast -Wshadow")
# Warnings recommended by Abseil (see https://abseil.io/docs/cpp/platforms/compilerflags).
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-qual -Wconversion-null -Woverlength-strings -Wpointer-arith -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings")
include(cmake/clang_tidy.cmake)
include(cmake/ccache.cmake)
include(cmake/version.cmake)
include(cmake/gdk-x11.cmake)
include(cmake/gresource.cmake)
include(cmake/gstreamer.cmake)
include(cmake/gtkmm.cmake)
include(cmake/openssl.cmake)
include(cmake/pulseaudio.cmake)
include(cmake/uuid.cmake)
include(cmake/x11.cmake)
include(cmake/xfixes.cmake)
find_package(Threads REQUIRED)
add_subdirectory(3rdparty)
set(HEADERS
src/access_control/access_control.h
src/access_control/action.h
src/access_control/actions/callback.h
src/access_control/actions/gpio.h
src/access_control/key.h
src/access_control/rfid_scanner.h
src/audio_manager.h
src/audio_player.h
src/call.h
src/call_history.h
src/call_protocol.h
src/camera.h
src/discovery.h
src/gstreamer/gstreamer.h
src/gstreamer/gstreamer_helpers.h
src/gstreamer/pipeline.h
src/instance.h
src/network/interface.h
src/network/ip_address.h
src/network/udp.h
src/pulseaudio_sink_occupier.h
src/screen_control.h
src/settings.h
src/stream/audio.h
src/stream/video.h
src/system/beep.h
src/system/gpio.h
src/system/machine_id.h
src/system/uuid.h
src/ui/constants.h
src/ui/gtk_helpers.h
src/ui/main_window.h
src/ui/scalingImage.h
src/ui/screen.h
src/ui/screens/action_screen.h
src/ui/screens/call_history_screen.h
src/ui/screens/call_screen.h
src/ui/screens/key_screen.h
src/ui/screens/key_input_screen.h
src/ui/screens/main_screen.h
src/ui/x_helpers.h
src/util/json.h
src/util/logging.h)
set(SOURCES
src/access_control/access_control.cpp
src/access_control/actions/callback.cpp
src/access_control/actions/gpio.cpp
src/access_control/key.cpp
src/access_control/rfid_scanner.cpp
src/audio_manager.cpp
src/audio_player.cpp
src/call.cpp
src/call_history.cpp
src/call_protocol.cpp
src/camera.cpp
src/discovery.cpp
src/gstreamer/gstreamer.cpp
src/gstreamer/pipeline.cpp
src/main.cpp
src/network/interface.cpp
src/network/ip_address.cpp
src/network/udp.cpp
src/pulseaudio_sink_occupier.cpp
src/screen_control.cpp
src/settings.cpp
src/stream/audio.cpp
src/stream/video.cpp
src/system/beep.cpp
src/system/gpio.cpp
src/system/machine_id.cpp
src/system/uuid.cpp
src/ui/main_window.cpp
src/ui/screen.cpp
src/ui/screens/action_screen.cpp
src/ui/screens/call_history_screen.cpp
src/ui/screens/call_screen.cpp
src/ui/screens/key_screen.cpp
src/ui/screens/key_input_screen.cpp
src/ui/screens/main_screen.cpp
src/ui/x_helpers.cpp
src/util/logging.cpp)
set(CONFIG_FILES
.clang-format
.clang-tidy)
compile_gresource(resources/resources.xml RESOURCE_FILE)
add_executable(${PROJECT_NAME}
${HEADERS}
${SOURCES}
resources/resources.xml
${RESOURCE_FILE}
${CONFIG_FILES})
target_include_directories(${PROJECT_NAME} PRIVATE
src)
target_link_libraries(${PROJECT_NAME} PRIVATE
cpp-httplib
gdk-x11
gstreamer
gtkmm
libuuid
json
openssl
pulseaudio
procxx
spdlog
Threads::Threads
x11
xfixes)
source_group(TREE "src")
if (RASPBERRY_PI)
target_compile_definitions(${PROJECT_NAME} PRIVATE RASPBERRY_PI)
endif()
if (RASPBERRY_PI)
include(install/package.cmake)
endif()