diff --git a/cmake/Modules/FindLibHackRF.cmake b/cmake/Modules/FindLibHackRF.cmake index f17094c..a0d57ef 100644 --- a/cmake/Modules/FindLibHackRF.cmake +++ b/cmake/Modules/FindLibHackRF.cmake @@ -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) - diff --git a/lib/hackrf/CMakeLists.txt b/lib/hackrf/CMakeLists.txt index 31f991b..c7af0c9 100644 --- a/lib/hackrf/CMakeLists.txt +++ b/lib/hackrf/CMakeLists.txt @@ -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 ########################################################################