forked from AD-Vega/rtl-power-fftw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (45 loc) · 1.31 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
cmake_minimum_required (VERSION 2.6)
project(rtl_power_fftw)
include(FindPkgConfig)
pkg_check_modules(TCLAP REQUIRED tclap)
pkg_check_modules(RTLSDR REQUIRED librtlsdr)
pkg_check_modules(FFTW3F REQUIRED fftw3f)
include_directories(
${TCLAP_INCLUDE_DIRS}
${RTLSDR_INCLUDE_DIRS}
${FFTW3F_INCLUDE_DIRS}
)
# Check for 'long long int' to make TCLAP happy.
include(CheckTypeSize)
check_type_size("long long int" LONG_LONG BUILTIN_TYPES_ONLY)
if(HAVE_LONG_LONG)
add_definitions(-DHAVE_LONG_LONG)
else()
message(FATAL_ERROR
"${PROJECT_NAME} requires the 'long long int' type to compile!")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif(NOT CMAKE_BUILD_TYPE)
add_executable(rtl_power_fftw
src/acquisition.cxx
src/datastore.cxx
src/device.cxx
src/interrupts.cxx
src/params.cxx
src/rtl_power_fftw.cxx
)
target_link_libraries(rtl_power_fftw
${FFTW3F_LDFLAGS}
${TCLAP_LDFLAGS}
${RTLSDR_LDFLAGS}
pthread
m
)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/rtl_power_fftw
DESTINATION bin)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/rtl_power_fftw.1
DESTINATION share/man/man1)