diff --git a/cmake/Modules/FindLibOsmoSDR.cmake b/cmake/Modules/FindLibOsmoSDR.cmake index d9dbe7b5e..3733b7321 100644 --- a/cmake/Modules/FindLibOsmoSDR.cmake +++ b/cmake/Modules/FindLibOsmoSDR.cmake @@ -1,3 +1,17 @@ +# Tries to find libosmosdr. +# +# Usage of this module as follows: +# +# find_package(LibOsmoSDR) +# +# +# Variables defined by this module: +# +# LIBOSMOSDR_FOUND System has libosmosdr libs/headers +# LIBOSMOSDR_LIBRARIES The libosmosdr libraries +# LIBOSMOSDR_INCLUDE_DIR The location of libosmosdr headers + + if(NOT LIBOSMOSDR_FOUND) pkg_check_modules (LIBOSMOSDR_PKG libosmosdr) find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h @@ -14,13 +28,13 @@ if(NOT LIBOSMOSDR_FOUND) /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) + 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)