1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
# - Try to find ALGLIB
# Once done this will define
#
# ALGLIB_FOUND - system has ALGLIB
# ALGLIB_INCLUDE_DIRS - the ALGLIB include directory
# ALGLIB_LIBRARIES - Link these to use ALGLIB
# ALGLIB_DEFINITIONS - Compiler switches required for using ALGLIB
#
# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (ALGLIB_LIBRARIES AND ALGLIB_INCLUDE_DIRS)
# in cache already
set(ALGLIB_FOUND TRUE)
else (ALGLIB_LIBRARIES AND ALGLIB_INCLUDE_DIRS)
find_path(ALGLIB_INCLUDE_DIR
NAMES
interpolation.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
${CMAKE_INSTALL_PREFIX}/include
PATH_SUFFIXES
alglib
libalglib
)
mark_as_advanced(ALGLIB_INCLUDE_DIR)
find_library(ALGLIB_LIBRARY
NAMES
alglib
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
${CMAKE_INSTALL_PREFIX}/lib
)
mark_as_advanced(ALGLIB_LIBRARY)
set(ALGLIB_INCLUDE_DIRS
${ALGLIB_INCLUDE_DIR}
)
set(ALGLIB_LIBRARIES
${ALGLIB_LIBRARY}
)
if (ALGLIB_INCLUDE_DIRS AND ALGLIB_LIBRARIES)
set(ALGLIB_FOUND TRUE)
endif (ALGLIB_INCLUDE_DIRS AND ALGLIB_LIBRARIES)
if (ALGLIB_FOUND)
if (NOT ALGLIB_FIND_QUIETLY)
message(STATUS "Found ALGLIB: ${ALGLIB_LIBRARIES}")
endif (NOT ALGLIB_FIND_QUIETLY)
else (ALGLIB_FOUND)
message(STATUS "Could not find ALGLIB using internal code.")
endif (ALGLIB_FOUND)
# show the PROJ_INCLUDE_DIRS and PROJ_LIBRARIES variables only in the advanced view
mark_as_advanced(ALGLIB_INCLUDE_DIRS ALGLIB_LIBRARIES)
endif (ALGLIB_LIBRARIES AND ALGLIB_INCLUDE_DIRS)
|