-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
90 lines (72 loc) · 1.6 KB
/
Copy pathCMakeLists.txt
File metadata and controls
90 lines (72 loc) · 1.6 KB
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
cmake_minimum_required(VERSION 3.16)
project(hackrf_modem3 CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(PkgConfig REQUIRED)
pkg_check_modules(HACKRF REQUIRED libhackrf)
include_directories(
${HACKRF_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
# ---- liquid-dsp (Homebrew, Apple Silicon) ----
set(LIQUID_ROOT "/opt/homebrew/opt/liquid-dsp")
set(LIQUID_INCLUDE_DIR "${LIQUID_ROOT}/include")
set(LIQUID_LIBRARY "${LIQUID_ROOT}/lib/libliquid.dylib")
link_directories(${HACKRF_LIBRARY_DIRS})
add_definitions(${HACKRF_CFLAGS_OTHER})
add_executable(tx_test
src/tx_test.cc
modem/packetizer.cc
modem/modulator.cc
)
target_link_libraries(tx_test
${HACKRF_LIBRARIES}
pthread
m
)
add_executable(rx_view
src/rx_view.cc
modem/packetizer.cc
modem/costas_loop.cc
modem/mueller_muller.cc
)
target_link_libraries(rx_view
${HACKRF_LIBRARIES}
pthread
m
${LIQUID_LIBRARY}
)
target_include_directories(rx_view PRIVATE ${LIQUID_INCLUDE_DIR})
add_executable(rx_peak
src/rx_peak.cc
modem/costas_loop.cc
modem/mueller_muller.cc
)
target_link_libraries(rx_peak
${HACKRF_LIBRARIES}
pthread
m
${LIQUID_LIBRARY}
)
target_include_directories(rx_peak PRIVATE ${LIQUID_INCLUDE_DIR})
add_executable(tx_robust
src/tx_robust.cc
modem/modulator.cc
)
target_link_libraries(tx_robust
${HACKRF_LIBRARIES}
pthread
m
)
add_executable(rx_robust
src/rx_robust.cc
modem/costas_loop.cc
modem/mueller_muller.cc
)
target_link_libraries(rx_robust
${HACKRF_LIBRARIES}
pthread
m
${LIQUID_LIBRARY}
)
target_include_directories(rx_robust PRIVATE ${LIQUID_INCLUDE_DIR})