forked from myriadrf/LimeSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
57 lines (46 loc) · 1.45 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
#project directory inside LimeSuite/mcu_program
cmake_policy(SET CMP0003 NEW)
#C++11 is a required language feature for this project
set(CMAKE_CXX_STANDARD 11)
cmake_dependent_option(ENABLE_MCU_TESTBENCH "MCU functions testing project" OFF "ENABLE_LIBRARY" OFF)
if(ENABLE_MCU_TESTBENCH)
if(CMAKE_COMPILER_IS_GNUCXX)
#enable C++11 on older versions of cmake
if (CMAKE_VERSION VERSION_LESS "3.1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11x")
endif()
#common warnings enabled
add_compile_options(-Wall)
endif()
set(HOST_SOURCES
host_src/mcu.c
host_src/main.cpp
host_src/spi.cpp
host_src/mcuHexBin.cpp
common_src/lms7002m_calibrations.c
common_src/lms7002m_controls.c
common_src/lms7002m_filters.c
common_src/lms7002m_agc.c
)
SET_SOURCE_FILES_PROPERTIES(
host_src/mcu.c
common_src/lms7002m_calibrations.c
common_src/lms7002m_controls.c
common_src/lms7002m_agc.c
PROPERTIES LANGUAGE CXX )
include_directories(../src)
include_directories(../src/lms7002m)
include_directories(../src/ConnectionRegistry)
include_directories(../src/ConnectionSTREAM)
include_directories(../src/protocols)
include_directories(common_src)
add_executable(MCU_TestBench ${HOST_SOURCES})
if(WIN32)
target_link_libraries(MCU_TestBench LimeSuite)
else()
target_link_libraries(MCU_TestBench LimeSuite)
endif()
if(WIN32)
target_link_libraries(MCU_TestBench ${CYAPI_LIBRARIES} SetupAPI)
endif()
endif(ENABLE_MCU_TESTBENCH)