-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
354 lines (308 loc) · 17.6 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
cmake_minimum_required(VERSION 3.5)
project(realtime-network-av)
option(USE_OMX "Build programs that use the OMX library on Raspberry Pi" OFF)
option(USE_CYTHON "Build programs that requite cython" ON)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
INCLUDE(VersionMacros)
INCLUDE(FindPkgConfig)
if (WIN32)
set(Extra_Libraries "ws2_32")
set(MSYS_DIR "c:/msys64/mingw64")
else()
set(Extra_Libraries "pthread")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_hypot=hypot -O3 -DNDEBUG -DMS_WIN64 -DBOOST_LOG_DYN_LINK")
# Add the usr directory to most of the paths if the installcation directory is /
if (${CMAKE_INSTALL_PREFIX} STREQUAL "/")
set(BinDir "usr/bin")
set(LibDir "usr/lib")
set(IncludeDir "usr/include")
set(PythonDistDir "dist-packages")
else ()
set(BinDir "bin")
set(LibDir "lib")
set(IncludeDir "include")
set(PythonDistDir "site-packages")
endif ()
# We have submodule, so we need git to update the submodule
find_package(Git QUIET)
# Update submodules as needed
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
option(GIT_SUBMODULE "Check submodules during build" OFF)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()
# Ensure the rtaudio directory was checked out successfully
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/modules/rtaudio/CMakeLists.txt")
message(FATAL_ERROR "The rtaudio submodule was not downloaded! Please update submodules and try again.")
endif()
# Ensure the mavlink directory was checked out successfully
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/modules/mavlink_c/protocol.h")
message(FATAL_ERROR "The mavlink_c submodule was not downloaded! Please update submodules and try again.")
endif()
# Ensure the dcadec directory was checked out successfully
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/modules/dcadec/dcadec.c")
message(FATAL_ERROR "The dcadec submodule was not downloaded! Please update submodules and try again.")
endif()
# Add the local include directory to the include path
include_directories(${PROJECT_SOURCE_DIR}/include)
if (USE_OMX)
include_directories(/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface/vmcs_host/linux)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM")
link_directories("/opt/vc/lib")
add_executable(rpi-camera-server src/rpi-camera-server.c)
target_link_libraries(rpi-camera-server openmaxil bcm_host vcos pthread)
install(TARGETS rpi-camera-server DESTINATION ${BinDir} COMPONENT applications)
endif (USE_OMX)
# Find the python3 interpreter
if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
set(Python_ADDITIONAL_VERSIONS "3")
set(PYTHON_EXECUTABLE "/usr/bin/python3")
find_package(PythonInterp 3.0 REQUIRED)
set(RELATIVE_PYTHON_DIR "${LibDir}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PythonDistDir}/wifibroadcast")
else ()
find_package(Python3 COMPONENTS Interpreter)
set(RELATIVE_PYTHON_DIR "${LibDir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/${PythonDistDir}/wifibroadcast")
endif ()
# Add rtaudio to the list of directories to build
add_subdirectory(modules/rtaudio)
# Add the python directory to the list of directories to build
add_subdirectory(python)
# Add the rtaudio directory to the paths
include_directories("${PROJECT_SOURCE_DIR}/modules/rtaudio")
link_directories("${PROJECT_SOURCE_DIR}/modules/rtaudio")
# Find the boost libraries
find_package(Boost REQUIRED COMPONENTS
program_options
system
filesystem
log)
include_directories(${Boost_INCLUDE_DIR})
# Build the udp_audio server
add_executable(udp_audio_player src/udp_audio_player.cc)
target_link_libraries(udp_audio_player rtaudio ${Extra_Libraries} ${Boost_LIBRARIES})
install(TARGETS udp_audio_player DESTINATION ${BinDir} COMPONENT applications)
add_subdirectory(modules/dcadec)
# To find and use ffmpeg avcodec library
find_package(FFmpeg)
include_directories(${AVCODEC_INCLUDE_DIR})
find_path(DCADEC_INCLUDE_DIR libdcadec/common.h PATHS ${PROJECT_SOURCE_DIR}/modules/dcadec)
find_library(DCADEC_LIBRARY dcacec PATHS ${PROJECT_SOURCE_DIR}/modules/dcadec)
include_directories(${DCADEC_INCLUDE_DIR})
pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2TTF REQUIRED SDL2_ttf)
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image)
pkg_search_module(SDL2GFX REQUIRED SDL2_gfx)
# Add the mavlink directory to the build
include_directories(${PROJECT_SOURCE_DIR}/modules/mavlink_c/common)
include_directories(${SDL2_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/sdl/include)
link_directories(${PROJECT_BINARY_DIR})
add_executable(video_stream_player
src/video_stream_player.cc
src/telemetry.cc
src/texture.cc
src/ffmpeg_decoder.cc
src/sdl_osd.cc
src/sdl_render_window.cc
src/transmitter.cc
src/fec.c
src/fec.cc)
target_link_libraries(video_stream_player
${AVCODEC_LIBRARIES}
${AVFORMAT_LIBRARIES}
${AVUTIL_LIBRARIES}
${SWSCALE_LIBRARIES}
${SDL2_LIBRARIES}
${SDL2TTF_LIBRARIES}
${SDL2IMAGE_LIBRARIES}
${SDL2GFX_LIBRARIES}
${Boost_LIBRARIES}
${Extra_Libraries}
ssl
crypto)
install(TARGETS video_stream_player DESTINATION ${BinDir} COMPONENT applications)
find_library(V4L_LIBRARY v4l2)
if (V4L_LIBRARY)
add_executable(v4l_h264_server
src/v4l_h264_server.cc)
target_link_libraries(v4l_h264_server ${V4L_LIBRARY} ${Boost_LIBRARIES} ${Extra_Libraries})
install(TARGETS v4l_h264_server DESTINATION ${BinDir} COMPONENT applications)
endif (V4L_LIBRARY)
find_package(ALSA)
if (ALSA_FOUND)
include_directories(${ALSA_INCLUDE_DIRS})
add_executable(spdif_to_udp src/spdif_to_udp.cc)
link_directories(modules/dcadec)
target_link_libraries(spdif_to_udp dcadec asound ${Boost_LIBRARIES})
install(TARGETS spdif_to_udp DESTINATION ${BinDir} COMPONENT applications)
endif ()
find_library(OPENMAXIL_LIBRARY openmaxil HINT /opt/vc/lib)
if (OPENMAXIL_LIBRARY)
find_library(BRCMGLES_LIBRARY brcmGLESv2 HINT /opt/vc/lib)
find_library(BRCMEGL_LIBRARY brcmEGL HINT /opt/vc/lib)
find_library(OPENMAXIL_LIBRARY openmaxil HINT /opt/vc/lib)
find_library(BCM_HOST_LIBRARY bcm_host HINT /opt/vc/lib)
find_library(VCOS_LIBRARY vcos HINT /opt/vc/lib)
find_library(VCHIQ_LIBRARY vchiq_arm HINT /opt/vc/lib)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DNDEBUG -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
include_directories(/opt/vc/include /opt/vc/src/hello_pi/libs/ilclient/)
link_directories(/opt/vc/lib)
add_executable(rpi_video_player src/rpi_video_player.cc src/ilclient.c src/ilcore.c)
target_link_libraries(rpi_video_player ${OPENMAXIL_LIBRARY} ${BRCMGLES_LIBRARY} ${BRCMEGL_LIBRARY} ${OPENMAXIL_LIBRARY} ${BCM_HOST_LIBRARY} ${VCOS_LIBRARY} ${VCHIQ_LIBRARY} ${Extra_Libraries})
install(TARGETS rpi_video_player DESTINATION ${BinDir} COMPONENT applications)
endif ()
#add_executable(csrf_receiver src/csrf_receiver.cc)
#install(TARGETS csrf_receiver DESTINATION ${BinDir} COMPONENT applications)
#target_link_libraries(csrf_receiver ${Boost_LIBRARIES} pthread)
# Add the wifibroadcast directory to the build
#add_subdirectory(${PROJECT_SOURCE_DIR}/wifibroadcast)
# Install the icons
install(FILES "${PROJECT_SOURCE_DIR}/icons/attitude-background.png" DESTINATION icons COMPONENT icons)
install(FILES "${PROJECT_SOURCE_DIR}/icons/attitude-foreground.png" DESTINATION icons COMPONENT icons)
install(FILES "${PROJECT_SOURCE_DIR}/icons/attitude-ground.png" DESTINATION icons COMPONENT icons)
install(FILES "${PROJECT_SOURCE_DIR}/icons/attitude-ring.png" DESTINATION icons COMPONENT icons)
install(FILES "${PROJECT_SOURCE_DIR}/icons/home-arrow.png" DESTINATION icons COMPONENT icons)
install(FILES "${PROJECT_SOURCE_DIR}/icons/north-arrow.png" DESTINATION icons COMPONENT icons)
# Install the font files
install(FILES "${PROJECT_SOURCE_DIR}/fonts/Cousine-Bold.ttf" DESTINATION fonts COMPONENT fonts)
install(FILES "${PROJECT_SOURCE_DIR}/fonts/Cousine-BoldItalic.ttf" DESTINATION fonts COMPONENT fonts)
install(FILES "${PROJECT_SOURCE_DIR}/fonts/Cousine-Italic.ttf" DESTINATION fonts COMPONENT fonts)
install(FILES "${PROJECT_SOURCE_DIR}/fonts/Cousine-Regular.ttf" DESTINATION fonts COMPONENT fonts)
# Install the configuration files
install(FILES "${PROJECT_SOURCE_DIR}/conf/fpvng" DESTINATION etc/default COMPONENT configuratios)
# Install the service files
install(FILES "${PROJECT_SOURCE_DIR}/services/fpvng.service" DESTINATION etc/systemd/system COMPONENT configuratios)
install(FILES "${PROJECT_SOURCE_DIR}/services/telemetry.service" DESTINATION etc/systemd/system COMPONENT configuratios)
# Create a windows installer
if (WIN32)
# Install the dependent dlls to the bin directory
install(FILES "${MSYS_DIR}/bin/libwinpthread-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libgcc_s_seh-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/avcodec-58.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libstdc++-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/avformat-58.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/avutil-56.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libboost_program_options-mt.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/SDL2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libSDL2_gfx-1-0-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/SDL2_image.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/SDL2_ttf.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/swscale-5.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libbz2-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libgnutls-30.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libcelt0-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libgsm.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libiconv-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libmfx-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/liblzma-5.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libmp3lame-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libopencore-amrnb-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libopencore-amrwb-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libmodplug-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/librtmp-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/zlib1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libopenjp2-7.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libopus-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libspeex-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libtheoradec-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libtheoraenc-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libvorbis-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libvorbisenc-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libbluray-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libpng16-16.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libjpeg-8.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libtiff-5.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libvpx-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libwavpack-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libwebp-7.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libwebpmux-3.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libwebpdemux-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libwebpdecoder-3.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libx265.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/xvidcore.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/swresample-3.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libx264-157.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libfreetype-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libcrypto-1_1-x64.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libfreetype-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libgmp-10.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libxml2-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libhogweed-4.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libnettle-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libogg-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libzstd.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libharfbuzz-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libglib-2.0-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libgraphite2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libintl-8.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libidn2-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libpcre-1.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libp11-kit-0.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libtasn1-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libunistring-2.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libffi-6.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${MSYS_DIR}/bin/libboost_filesystem-mt.dll" DESTINATION bin COMPONENT dlls)
install(FILES "${PROJECT_BINARY_DIR}/libsrt.dll" DESTINATION bin COMPONENT dlls)
set(CPACK_PACKAGE_NAME "FPV-NG")
set(CPACK_PACKAGE_VENDOR "Me")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FPV")
set(CPACK_PACKAGE_VERSION "0.1.0")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "FPV-NG")
# Define components and their display names
set(CPACK_COMPONENTS_ALL applications libraries dlls headers icons fonts configurations)
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "FPV-NG Applications")
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
set(CPACK_COMPONENT_DLLS_DISPLAY_NAME "DLLs")
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
set(CPACK_COMPONENT_ICONS_DISPLAY_NAME "Icons")
set(CPACK_COMPONENT_FONTS_DISPLAY_NAME "Fonts")
# Human readable component descriptions
set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION
"An extremely useful application that makes use of FPV-NG")
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
"Static libraries used to build programs with FPV-NG")
set(CPACK_COMPONENT_DLLS_DESCRIPTION
"Shared libraries used to build programs with FPV-NG")
set(CPACK_COMPONENT_HEADERS_DESCRIPTION
"C/C++ header files for use with FPV-NG")
set(CPACK_COMPONENT_ICONS_DESCRIPTION
"Icon image files for use with FPV-NG")
set(CPACK_COMPONENT_FONTS_DESCRIPTION
"Font files for use with FPV-NG")
# Define dependencies between components
set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
set(CPACK_COMPONENT_APPLICATIONS_DEPENDS dlls icons fonts)
# Define groups
set(CPACK_COMPONENT_APPLICATIONS_GROUP "Runtime")
set(CPACK_COMPONENT_DLLS_GROUP "Runtime")
set(CPACK_COMPONENT_ICONS_GROUP "Runtime")
set(CPACK_COMPONENT_FONTS_GROUP "Runtime")
set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
"All of the tools you'll ever need to develop software")
# Define NSIS installation types
set(CPACK_ALL_INSTALL_TYPES Full Developer)
set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Developer Full)
set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
set(CPACK_COMPONENT_DLLS_INSTALL_TYPES Full)
set(CPACK_COMPONENT_ICONS_INSTALL_TYPES Full)
set(CPACK_COMPONENT_FONTS_INSTALL_TYPES Full)
# Add the list of executables taht will be linked onto the start menu
set(CPACK_PACKAGE_EXECUTABLES "video_stream_player;FPV Viewer")
# Must be after the last CPACK macros
include(CPack)
endif ()