forked from cropinghigh/sdrpp-tetra-demodulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (40 loc) · 1.58 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
cmake_minimum_required(VERSION 3.13)
project(tetra_demodulator)
set(CMAKE_INSTALL_PREFIX "/usr/")
include(GNUInstallDirs)
if (MSVC)
set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup")
else ()
set(CMAKE_CXX_FLAGS "-O3 -std=c++17")
endif ()
file(GLOB SRC LIST_DIRECTORIES false
"src/*.cpp"
"src/*.c"
"src/decoder/src/*.cpp"
"src/decoder/src/*.c"
"src/decoder/src/crypto/*.cpp"
"src/decoder/src/crypto/*.c"
"src/decoder/src/lower_mac/*.cpp"
"src/decoder/src/lower_mac/*.c"
"src/decoder/src/phy/*.cpp"
"src/decoder/src/phy/*.c"
"src/decoder/codec/c-code/cdec_tet.c"
"src/decoder/codec/c-code/sub_cd.c"
"src/decoder/codec/c-code/tetra_op.c"
"src/decoder/codec/c-code/sdec_tet.c"
"src/decoder/codec/c-code/sub_sc_d.c"
"src/decoder/codec/c-code/sub_dsp.c"
"src/decoder/codec/c-code/fbas_tet.c"
"src/decoder/codec/c-code/fexp_tet.c"
"src/decoder/codec/c-code/fmat_tet.c"
"src/decoder/codec/c-code/tetra_op.c"
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
add_library(tetra_demodulator SHARED ${SRC})
target_link_libraries(tetra_demodulator PRIVATE sdrpp_core osmocore)
target_include_directories(tetra_demodulator PRIVATE "src/" "src/decoder/src" "src/decoder/codec" "/usr/include/sdrpp_core/" "/usr/include/sdrpp_core/imgui")
set_target_properties(tetra_demodulator PROPERTIES PREFIX "")
# Install directives
install(TARGETS tetra_demodulator DESTINATION /usr/lib/sdrpp/plugins)