Warning, /office/calligra/cmake/modules/FindGSL.cmake is written in an unsupported language. File is not indexed.
0001 # - Find GSL 0002 # Find the GNU Scientific Library (GSL) includes and library 0003 # 0004 # This module defines 0005 # GSL_FOUND 0006 # GSL_LIBRARIES 0007 # GSL_CBLAS_LIBRARIES 0008 # GSL_INCLUDE_DIR 0009 # GSL_VERSION 0010 # 0011 0012 include(UsePkgConfig) 0013 0014 if (GSL_INCLUDE_DIR AND GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_VERSION) 0015 0016 # Already in cache 0017 SET(GSL_FOUND TRUE) 0018 0019 else () 0020 0021 FIND_LIBRARY (GSL_LIBRARIES gsl) 0022 0023 FIND_LIBRARY (GSL_CBLAS_LIBRARIES gslcblas) 0024 0025 FIND_PATH (GSL_INCLUDE_DIR gsl_multimin.h 0026 /usr/include 0027 /usr/local/include 0028 ${CMAKE_INCLUDE_PATH} 0029 PATH_SUFFIXES gsl 0030 ) 0031 0032 FIND_PROGRAM (GSL_CONFIG gsl-config) 0033 0034 IF (GSL_CONFIG) 0035 EXEC_PROGRAM (${GSL_CONFIG} ARGS "--version" OUTPUT_VARIABLE gsl_version) 0036 # EXEC_PROGRAM (${GSL_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE gsl_include_dir) 0037 # EXEC_PROGRAM (${GSL_CONFIG} ARGS "--libs" OUTPUT_VARIABLE gsl_libraries) 0038 0039 # STRING (REGEX REPLACE "-I([^ ]*)" "\\1" GSL_INCLUDE_DIR "${gsl_include_dir}") 0040 # STRING (REGEX REPLACE "-L([^ ]*)" "\\1" GSL_LIBRARIES "${gsl_libraries}") 0041 SET (GSL_VERSION ${gsl_version} CACHE STRING "GNU Scientific Library Version") 0042 # TODO check version! 1.6 suffices? 0043 ENDIF (GSL_CONFIG) 0044 0045 IF (NOT GSL_INCLUDE_DIR OR NOT GSL_CONFIG) 0046 # Try pkg-config instead, but only for the 0047 # include directory, since we really need 0048 # the *LIBRARIES to point to the actual .so's. 0049 PKGCONFIG(gsl GSL_INCLUDE_DIR dummy dummy dummy) 0050 ENDIF (NOT GSL_INCLUDE_DIR OR NOT GSL_CONFIG) 0051 # 0052 # everything necessary found? 0053 # 0054 IF (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) 0055 SET (GSL_FOUND TRUE) 0056 ELSE (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) 0057 SET (GSL_FOUND FALSE) 0058 ENDIF (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) 0059 0060 endif () 0061 0062 0063 # 0064 # output status 0065 # 0066 if (GSL_FOUND) 0067 if (NOT GSL_FIND_QUIETLY) 0068 MESSAGE (STATUS "Found GNU Scientific Library ${GSL_VERSION}: ${GSL_INCLUDE_DIR} ${GSL_LIBRARIES};${GSL_CBLAS_LIBRARIES}") 0069 endif() 0070 else () 0071 if (GSL_FIND_REQUIRED) 0072 MESSAGE (STATUS "GNU Scientific Library not found. " 0073 "Calligra Sheets' solver plugin won't be compiled.") 0074 endif () 0075 endif () 0076