cmake: move check for hackrf_device_list to hackrf subdirectory

This commit is contained in:
Dimitri Stolnikov 2015-06-06 22:01:33 +02:00
parent f33f30815a
commit 46e95395e0
2 changed files with 9 additions and 9 deletions

View File

@ -23,12 +23,3 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBHACKRF DEFAULT_MSG LIBHACKRF_LIBRARIES LIBHACKRF_INCLUDE_DIRS)
MARK_AS_ADVANCED(LIBHACKRF_LIBRARIES LIBHACKRF_INCLUDE_DIRS)
INCLUDE(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${LIBHACKRF_LIBRARIES})
CHECK_FUNCTION_EXISTS(hackrf_device_list LIBHACKRF_HAVE_DEVICE_LIST)
if(LIBHACKRF_HAVE_DEVICE_LIST)
message(STATUS "HackRF multiple device support enabled")
add_definitions(-DLIBHACKRF_HAVE_DEVICE_LIST)
endif(LIBHACKRF_HAVE_DEVICE_LIST)

View File

@ -31,6 +31,15 @@ set(hackrf_srcs
${CMAKE_CURRENT_SOURCE_DIR}/hackrf_sink_c.cc
)
INCLUDE(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${LIBHACKRF_LIBRARIES})
CHECK_FUNCTION_EXISTS(hackrf_device_list LIBHACKRF_HAVE_DEVICE_LIST)
if(LIBHACKRF_HAVE_DEVICE_LIST)
message(STATUS "HackRF multiple device support enabled")
add_definitions(-DLIBHACKRF_HAVE_DEVICE_LIST)
endif(LIBHACKRF_HAVE_DEVICE_LIST)
########################################################################
# Append gnuradio-osmosdr library sources
########################################################################