-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCMakeLists.txt
62 lines (51 loc) · 1.55 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
cmake_minimum_required(VERSION 2.8.0)
# Project
project (limesdr_dump)
project (limesdr_send)
project (limesdr_stopchannel)
project (limesdr_forward)
# We have some custom .cmake scripts no in the offical distribution.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
add_definitions(-Wall)
add_definitions(-g)
add_definitions(-O2)
endif()
find_package(LimeSuite)
if(NOT LIB_LIMESUITE_FOUND)
message(FATAL_ERROR "LimeSuite required to compile")
endif()
# Finish configuring compiler/linker settings & flags
include_directories(
${LIB_LIMESUITE_INCLUDE_DIRS}
)
link_directories(
${LIB_LIMESUITE_LIBRARIES}
)
message(" include dir = ${LIB_LIMESUITE_INCLUDE_DIRS}")
message(" link dir = ${LIB_LIMESUITE_LIBRARIES}")
# build program
add_executable(limesdr_dump limesdr_dump.c limesdr_util.c)
add_executable(limesdr_send limesdr_send.c limesdr_util.c)
add_executable(limesdr_stopchannel limesdr_stopchannel.c)
add_executable(limesdr_forward limesdr_forward.c limesdr_util.c)
target_link_libraries( limesdr_dump
LINK_PUBLIC
${LIB_LIMESUITE_LIBRARIES}
)
target_link_libraries( limesdr_send
LINK_PUBLIC
${LIB_LIMESUITE_LIBRARIES}
)
target_link_libraries( limesdr_stopchannel
LINK_PUBLIC
${LIB_LIMESUITE_LIBRARIES}
)
target_link_libraries( limesdr_forward
LINK_PUBLIC
${LIB_LIMESUITE_LIBRARIES}
)
install(TARGETS limesdr_dump RUNTIME)
install(TARGETS limesdr_send RUNTIME)
install(TARGETS limesdr_stopchannel RUNTIME)
install(TARGETS limesdr_forward RUNTIME)