mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-18 14:21:49 -05:00
29 lines
838 B
CMake
29 lines
838 B
CMake
|
if(NOT LIBOSMOSDR_FOUND)
|
||
|
|
||
|
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
|
||
|
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
|
||
|
PATHS
|
||
|
${LIBOSMOSDR_PKG_INCLUDE_DIRS}
|
||
|
/usr/include
|
||
|
/usr/local/include
|
||
|
)
|
||
|
|
||
|
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
|
||
|
PATHS
|
||
|
${LIBOSMOSDR_PKG_LIBRARY_DIRS}
|
||
|
/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)
|