-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (36 loc) · 1.4 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
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.4 )
# allow more human readable "if then else" constructs
#SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++11")
# Add the local Find*.cmake scripts
LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
PROJECT(ElectrosenseIQ)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -Wall")
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Werror -ggdb -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
# Set default build type
IF( NOT CMAKE_BUILD_TYPE )
SET( CMAKE_BUILD_TYPE "release" )
ENDIF()
# Find needed packages.
FIND_PACKAGE( OpenMP )
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
FIND_PACKAGE( ITPP REQUIRED)
INCLUDE_DIRECTORIES("${ITPP_INCLUDE_DIR}")
FIND_PACKAGE( BLAS REQUIRED )
FIND_PACKAGE( LAPACK REQUIRED )
FIND_PACKAGE( FFTW REQUIRED )
INCLUDE_DIRECTORIES("${FFTW_INCLUDE_DIR}")
FIND_PACKAGE( RTLSDR REQUIRED )
INCLUDE_DIRECTORIES("${RTLSDR_INCLUDE_DIR}")
FIND_PACKAGE( Curses REQUIRED )
INCLUDE_DIRECTORIES("${CURSES_INCLUDE_DIR}")
SET( DEPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Deps)
include(${DEPS_DIR}/ice/CMakeLists.txt)
include(${DEPS_DIR}/rtl-sdr/CMakeLists.txt)
include(${DEPS_DIR}/boost/CMakeLists.txt)
include(${DEPS_DIR}/zlib/CMakeLists.txt)
# Descend into subdirectories
ADD_SUBDIRECTORY(src)