-
Notifications
You must be signed in to change notification settings - Fork 68
/
CMakeLists.txt
31 lines (24 loc) · 887 Bytes
/
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
cmake_minimum_required (VERSION 2.8.11)
project (fobrob)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
find_library(USB_LIB rtlsdr)
if(NOT USB_LIB)
message(FATAL_ERROR "rtlsdr library not found")
endif()
add_compile_options("-std=c99")
add_library(encoding STATIC hex.c manchester.c)
add_library(runningavg STATIC runningavg.c)
add_library(demodulator STATIC demodulator.c)
add_library(filter STATIC filter.c)
add_library(protocol STATIC protocol.c)
add_library(modem STATIC demodulator.c filter.c runningavg.c)
add_executable (rpitxify rpitxify.c)
add_executable (fobrob fobrob.c)
add_executable (rollthecode rollthecode.c)
TARGET_LINK_LIBRARIES(rpitxify encoding)
TARGET_LINK_LIBRARIES(rollthecode encoding protocol)
TARGET_LINK_LIBRARIES(fobrob encoding modem protocol pthread rtlsdr m)