From 12598ea17fbe5aa2d275d223786cf599c819899d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 27 Dec 2012 17:30:11 +0000 Subject: [PATCH] add documentation to the libosmosdr cmake module git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@299 64b25241-fba3-4117-9849-534c7e92360d --- cmake/Modules/FindLibOsmoSDR.cmake | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) 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)