-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
66 lines (55 loc) · 1.16 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
cmake_minimum_required(VERSION 3.22)
project(tetra-receiver)
SET(CMAKE_CXX_STANDARD 17)
#
# Find required libraries
#
find_package(Gnuradio "3.8" REQUIRED)
find_package(Boost REQUIRED)
find_package(Volk REQUIRED)
find_package(gnuradio-osmosdr REQUIRED)
find_package(cxxopts REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)
include_directories(${GNURADIO_ALL_INCLUDE_DIRS})
#
# Turn ON Testing
#
enable_testing()
#
# Configure the tetra-receiver library
#
add_library(lib-tetra-receiver
src/config.cpp
)
target_include_directories(lib-tetra-receiver PUBLIC include)
#
# Build the tool
#
add_executable(tetra-receiver
src/prometheus.cpp
src/prometheus_gauge_populator.cpp
src/tetra-receiver.cpp
)
target_compile_options(tetra-receiver PUBLIC -std=c++17 -Wall)
target_link_libraries(tetra-receiver
lib-tetra-receiver
log4cpp
volk
gnuradio-osmosdr
gnuradio-digital
gnuradio-analog
gnuradio-filter
gnuradio-blocks
gnuradio-fft
gnuradio-runtime
gnuradio-pmt
prometheus-cpp::pull
)
#
# Testing
#
add_subdirectory(test)
#
# Install tetra-receiver in bin folder
#
install(TARGETS tetra-receiver DESTINATION bin)