-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (64 loc) · 2.88 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
project(tetra-decoder)
cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_STANDARD 17)
option(NIX_BUILD "Is CMake called by a nix build?" OFF)
add_library(tetra-decoder-library
src/decoder.cpp
src/bit_stream_decoder.cpp
src/iq_stream_decoder.cpp
src/prometheus.cpp
src/borzoi/borzoi_packets.cpp
src/borzoi/borzoi_sender.cpp
src/l2/access_assignment_channel.cpp
src/l2/broadcast_synchronization_channel.cpp
src/l2/logical_link_control_formatter.cpp
src/l2/logical_link_control_packet.cpp
src/l2/lower_mac.cpp
src/l2/slot.cpp
src/l2/timebase_counter.cpp
src/l2/upper_mac.cpp
src/l2/upper_mac_packet.cpp
src/l2/upper_mac_packet_builder.cpp
src/l2/upper_mac_packet_formatter.cpp
src/l3/circuit_mode_control_entity_formatter.cpp
src/l3/circuit_mode_control_entity_packet.cpp
src/l3/mobile_link_entity_formatter.cpp
src/l3/mobile_link_entity_packet.cpp
src/l3/mobile_management_formatter.cpp
src/l3/mobile_management_packet.cpp
src/l3/short_data_service_formatter.cpp
src/l3/short_data_service_packet.cpp
src/utils/address.cpp
src/utils/bit_vector.cpp
src/utils/viter_bi_codec.cpp)
add_executable(tetra-decoder
src/main.cpp)
add_executable(tetra-puncturing
src/examples/tetra_puncturing.cpp)
add_executable(tetra-viterbi
src/examples/viter_bi_codec.cpp
src/examples/tetra_viterbi.cpp)
target_compile_options(tetra-decoder-library PUBLIC -std=c++17 -Wall -Wno-unused-variable -msse4.1 -O3 -fcolor-diagnostics)
target_compile_options(tetra-decoder PUBLIC -std=c++17 -Wall -Wno-unused-variable)
target_compile_options(tetra-puncturing PUBLIC -std=c++17 -Wall -Wno-unused-variable)
target_compile_options(tetra-viterbi PUBLIC -std=c++17 -Wall -Wno-unused-variable)
include(lib/ViterbiDecoderCpp/viterbi-config.cmake)
include_directories(lib/rapidcsv/src)
include_directories(src)
find_package(cxxopts CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(fmt REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)
find_package(cpr REQUIRED)
include_directories(${CMAKE_SOURCE_DIR}/include)
if (NOT NIX_BUILD)
target_link_libraries(tetra-decoder-library cxxopts::cxxopts)
endif()
target_link_libraries(tetra-decoder-library ZLIB::ZLIB fmt::fmt nlohmann_json::nlohmann_json viterbi prometheus-cpp::pull cpr::cpr)
target_link_libraries(tetra-decoder tetra-decoder-library)
target_link_libraries(tetra-viterbi viterbi)
install(TARGETS tetra-decoder DESTINATION bin)
install(TARGETS tetra-puncturing DESTINATION bin)
install(TARGETS tetra-viterbi DESTINATION bin)
include(src/experiments/CMakeLists.txt)