mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-11 17:35:16 -05:00
27 lines
860 B
CMake
27 lines
860 B
CMake
if(NOT LIBOSMOSDR_FOUND)
|
|
|
|
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
|
|
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
|
|
HINTS ${LIBOSMOSDR_PKG_INCLUDE_DIRS}
|
|
PATHS /usr/include
|
|
/usr/local/include
|
|
)
|
|
|
|
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
|
|
HINTS ${LIBOSMOSDR_PKG_LIBRARY_DIRS}
|
|
PATHS /usr/lib
|
|
/usr/local/lib
|
|
)
|
|
|
|
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)
|