From e8601cf1116ecef007661ecad6239316b2aadec1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 27 Nov 2013 21:11:21 +0000 Subject: [PATCH] Improving detection of required libraries and giving hints on how to install them: BLAS, LAPACK, gfortran and OpenSSL. git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@454 64b25241-fba3-4117-9849-534c7e92360d --- CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++++-- README | 2 +- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 063509c11..4641bfe97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,6 +368,30 @@ endif(DOXYGEN_FOUND) # Armadillo - http://arma.sourceforge.net/ ################################################################################ +if(OS_IS_LINUX) + find_package(LAPACK) + if(NOT LAPACK_FOUND) + message(" A library with a LAPACK API has not been found.") + message(" You can try to install it by typing:") + message(" sudo apt-get install liblapack-dev") + message(FATAL_ERROR "LAPACK is required to build gnss-sdr") + endif(NOT LAPACK_FOUND) + find_package(BLAS) + if(NOT BLAS_FOUND) + message(" A library with a BLAS API has not been found.") + message(" You can try to install it by typing:") + message(" sudo apt-get install libblas-dev") + message(FATAL_ERROR "BLAS is required to build gnss-sdr") + endif(NOT BLAS_FOUND) + find_library(GFORTRAN gfortran) + if(GFORTRAN-NOTFOUND) + message(" GFortran has not been found.") + message(" You can try to install it by typing:") + message(" sudo apt-get install gfortran") + message(FATAL_ERROR "Gfortran is required to build gnss-sdr") + endif(GFORTRAN-NOTFOUND) +endif(OS_IS_LINUX) + find_package(Armadillo) if(NOT ARMADILLO_FOUND) message (" Armadillo has not been found.") @@ -418,12 +442,28 @@ endif(NOT ARMADILLO_FOUND) -######################################################################## +############################################################################### # OpenCL -######################################################################## +############################################################################### find_package(OpenCL) +################################################################################ +# OpenSSL - http://www.openssl.org +################################################################################ +find_package(OpenSSL) +if(NOT OPENSSL_FOUND) + message(" The OpenSSL library has not been found.") + message(" You can try to install it by typing:") + if(OS_IS_LINUX) + message(" sudo apt-get install libssl-dev") + endif(OS_IS_LINUX) + if(OS_IS_MACOSX) + message(" sudo port install openssl") + endif(OS_IS_MACOSX) + message(FATAL_ERROR "OpenSSL libraries are required to build gnss-sdr") +endif(NOT OPENSSL_FOUND) + ################################################################################ # Setup of optional drivers diff --git a/README b/README index cfe26a275..0c4212ee1 100644 --- a/README +++ b/README @@ -40,7 +40,7 @@ In case you do not want to use PyBOMBS and prefer to build and install GNU Radio - Download, compile, and install the Armadillo linear algebra library -$ sudo apt-get install libatlas-dev liblapack-dev gfortran +$ sudo apt-get install libblas-dev liblapack-dev gfortran $ wget http://sourceforge.net/projects/arma/files/armadillo-3.920.2.tar.gz $ tar xvfz armadillo-3.920.2.tar.gz $ cd armadillo-3.920.2