1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 05:11:49 -05:00
sdrangel/cmake/Modules/FindLibAIRSPY.cmake

32 lines
943 B
CMake
Raw Normal View History

2015-09-09 23:53:37 -04:00
if(NOT LIBAIRSPY_FOUND)
pkg_check_modules (LIBAIRSPY_PKG libairspy)
find_path(LIBAIRSPY_INCLUDE_DIR
NAMES libairspy/airspy.h
HINTS ${AIRSPY_DIR}/include
${LIBAIRSPY_PKG_INCLUDE_DIRS}
PATHS /usr/include
/usr/local/include
2015-09-09 23:53:37 -04:00
)
find_library(LIBAIRSPY_LIBRARIES
NAMES airspy
HINTS ${AIRSPY_DIR}/lib
${LIBAIRSPY_PKG_LIBRARY_DIRS}
PATHS /usr/lib
/usr/local/lib
2015-09-09 23:53:37 -04:00
)
if(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
set(LIBAIRSPY_FOUND TRUE CACHE INTERNAL "libairspy found")
message(STATUS "Found libairspy: ${LIBAIRSPY_INCLUDE_DIR}, ${LIBAIRSPY_LIBRARIES}")
else(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
set(LIBAIRSPY_FOUND FALSE CACHE INTERNAL "libairspy found")
message(STATUS "libairspy not found.")
endif(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
mark_as_advanced(LIBAIRSPY_INCLUDE_DIR LIBAIRSPY_LIBRARIES)
endif(NOT LIBAIRSPY_FOUND)