1 # Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 #! \ingroup FindPackage
20 #! Find the native GSL headers and libraries.
22 #! - `GSL_INCLUDE_DIRS` - where to find gsl/gsl_linalg.h, etc.
23 #! - `GSL_LIBRARIES` - List of libraries when using gsl.
24 #! - `GSL_FOUND` - True if gsl found.
27 include(LibFindMacros)
28 # use gslcblas for now
29 #libfind_package(GSL CBLAS)
32 find_package(PkgConfig QUIET)
33 pkg_check_modules(GSL_PKGCONF QUIET gsl)
36 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${GSL_PKGCONF_INCLUDE_DIRS} $ENV{UIBK_GSL_INC})
37 find_library(GSL_LIBRARY NAMES gsl HINTS ${GSL_PKGCONF_LIBRARY_DIRS} $ENV{UIBK_GSL_LIB})
38 find_library(GSLCBLAS_LIBRARY NAMES gslcblas HINTS ${GSL_PKGCONF_LIBRARY_DIRS} $ENV{UIBK_GSL_LIB})
40 # Set the include dir variables and the libraries and let libfind_process do the rest.
41 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
42 set(GSL_PROCESS_INCLUDES GSL_INCLUDE_DIR)
43 set(GSL_PROCESS_LIBS GSL_LIBRARY GSLCBLAS_LIBRARY)