2014-05-18 11:52:39 -04:00
|
|
|
if(NOT LIBOSMOSDR_FOUND)
|
|
|
|
|
|
|
|
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
|
|
|
|
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${LIBOSMOSDR_PKG_INCLUDE_DIRS}
|
|
|
|
PATHS /usr/include
|
|
|
|
/usr/local/include
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${LIBOSMOSDR_PKG_LIBRARY_DIRS}
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
if(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
|
|
|
|
set(LIBOSMOSDR_FOUND TRUE CACHE INTERNAL "libosmosdr found")
|
|
|
|
message(STATUS "Found libosmosdr: ${LIBOSMOSDR_INCLUDE_DIR}, ${LIBOSMOSDR_LIBRARIES}")
|
|
|
|
else(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
|
|
|
|
set(LIBOSMOSDR_FOUND FALSE CACHE INTERNAL "libosmosdr found")
|
|
|
|
message(STATUS "libosmosdr not found.")
|
|
|
|
endif(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
|
|
|
|
|
|
|
|
endif(NOT LIBOSMOSDR_FOUND)
|