-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
50 lines (39 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
46
47
48
49
50
########################################################################
# Build Soapy SDR support module for FCDPP
########################################################################
cmake_minimum_required(VERSION 2.8.7)
project(SoapyFCDPP CXX C)
find_package(SoapySDR "0.6.0" NO_MODULE)
if (NOT SoapySDR_FOUND)
message(FATAL_ERROR "Soapy SDR development files not found...")
endif ()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
find_package(HIDAPI)
if (HIDAPI_FOUND)
message(STATUS "HIDAPI_INCLUDE_DIR: ${HIDAPI_INCLUDE_DIR}")
message(STATUS "HIDAPI_LIBRARY: ${HIDAPI_LIBRARY}")
else()
message(FATAL_ERROR "HID API development files not found...")
endif ()
find_package(ALSA)
if (ALSA_FOUND)
message(STATUS "ALSA_INCLUDE_DIRS: ${ALSA_INCLUDE_DIRS}")
message(STATUS "ALSA_LIBRARIES: ${ALSA_LIBRARIES}")
else()
message(FATAL_ERROR "ALSA development files not found...")
endif ()
if(CMAKE_COMPILER_IS_GNUCXX)
#disable warnings for unused parameters+results
add_definitions(-Wno-unused-parameter -Wno-unused-result)
endif(CMAKE_COMPILER_IS_GNUCXX)
include_directories(${HIDAPI_INCLUDE_DIR})
SOAPY_SDR_MODULE_UTIL(
TARGET FCDPPSupport
SOURCES
SoapyFCDPP/SoapyFCDPP.cpp
SoapyFCDPP/alsa.c
SoapyFCDPP/fcd.c
LIBRARIES ${HIDAPI_LIBRARY} ${ALSA_LIBRARIES}
)
add_executable(fcddirect fcddirect.cpp)
target_link_libraries(fcddirect SoapySDR)