-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
42 lines (34 loc) · 1.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
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(rid-transmitter VERSION 0.1 LANGUAGES C CXX)
add_compile_options(-Wall -Werror -Wunused -Wextra -Wno-address-of-packed-member)
# Assumes MAVSDK system wide install
list(APPEND CMAKE_PREFIX_PATH "/usr/local/MAVSDK/install")
find_package(MAVSDK REQUIRED)
# Include bluez
find_package(PkgConfig REQUIRED)
pkg_check_modules(BLUEZ REQUIRED bluez)
include_directories(${BLUEZ_INCLUDE_DIRS})
link_directories(${BLUEZ_LIBRARY_DIRS})
include_directories(
src/misc
src/Bluetooth
src/Transmitter
libraries/tomlplusplus/
libraries/opendroneid-core-c/libopendroneid
${BLUEZ_INCLUDE_DIRS}
)
# Create executable
add_executable(${PROJECT_NAME}
libraries/opendroneid-core-c/libopendroneid/opendroneid.c
src/Bluetooth/Bluetooth.cpp
src/Bluetooth/BluetoothLegacy.cpp
src/Bluetooth/print_bt_features.c
src/Transmitter/Transmitter.cpp
src/main.cpp
)
target_link_libraries(${PROJECT_NAME}
MAVSDK::mavsdk
${BLUEZ_LIBRARIES}
)