FindBoostNumericBindings.cmake
Go to the documentation of this file.
00001 ############################################################################## 00002 # @file FindBoostNumericBindings.cmake 00003 # @brief Find Boost Numeric Bindings package. 00004 # 00005 # This module looks for an installation of the Boost Numeric Bindings package, 00006 # a bindings library for Boost.Ublas 00007 # (see http://mathema.tician.de/software/boost-numeric-bindings). Note that 00008 # you will also need Boost.Ublas in order to use this headers-only library. 00009 # 00010 # @par Input variables: 00011 # <table border="0"> 00012 # <tr> 00013 # @tp @b BoostNumericBindings_DIR @endtp 00014 # <td>The Boost Numeric Bindings package files are searched under the 00015 # specified root directory. This variable can also be set as environment 00016 # variable.</td> 00017 # </tr> 00018 # <tr> 00019 # @tp @b BOOSTNUMERICBINDINGS_DIR @endtp 00020 # <td>Alternative environment variable for @p BoostNumericBindings_DIR.</td> 00021 # </tr> 00022 # </table> 00023 # 00024 # @par Output variables: 00025 # <table border="0"> 00026 # <tr> 00027 # @tp @b BoostNumericBindings_FOUND @endtp 00028 # <td>Whether the Boost Numeric Bindings package was found and the following 00029 # CMake variables are valid.</td> 00030 # </tr> 00031 # <tr> 00032 # @tp @b BoostNumericBindings_INCLUDE_DIR @endtp 00033 # <td>Cached include directory/ies.</td> 00034 # </tr> 00035 # <tr> 00036 # @tp @b BoostNumericBindings_INCLUDE_DIRS @endtp 00037 # <td>Alias for @p BoostNumericBindings_INCLUDE_DIR (not cached).</td> 00038 # </tr> 00039 # <tr> 00040 # @tp @b BoostNumericBindings_INCLUDES @endtp 00041 # <td>Alias for @p BoostNumericBindings_INCLUDE_DIR (not cached).</td> 00042 # </tr> 00043 # </table> 00044 # 00045 # Copyright (c) 2012 University of Pennsylvania. All rights reserved.<br /> 00046 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file. 00047 # 00048 # Contact: SBIA Group <sbia-software at uphs.upenn.edu> 00049 # 00050 # @ingroup CMakeFindModules 00051 ############################################################################## 00052 00053 # ---------------------------------------------------------------------------- 00054 # initialize search 00055 if (NOT BoostNumericBindings_DIR) 00056 if (NOT "$ENV{BOOSTNUMERICBINDINGS_DIR}" STREQUAL "") 00057 set ( 00058 BoostNumericBindings_DIR 00059 "$ENV{BOOSTNUMERICBINDINGS_DIR}" 00060 CACHE PATH 00061 "Installation prefix of boost-numeric-bindings." 00062 FORCE 00063 ) 00064 else () 00065 set ( 00066 BoostNumericBindings_DIR 00067 "$ENV{BoostNumericBindings_DIR}" 00068 CACHE PATH 00069 "Installation prefix of boost-numeric-bindings." 00070 FORCE 00071 ) 00072 endif () 00073 endif () 00074 00075 # ---------------------------------------------------------------------------- 00076 # find paths/files 00077 if (BoostNumericBindings_DIR) 00078 00079 find_path ( 00080 BoostNumericBindings_INCLUDE_DIR 00081 NAMES boost/numeric/bindings/atlas/cblas.hpp 00082 HINTS ${BoostNumericBindings_DIR} 00083 PATH_SUFFIXES "include" "include/boost-numeric-bindings" 00084 DOC "Root include directory of boost-numeric-bindings." 00085 NO_DEFAULT_PATH 00086 ) 00087 00088 else () 00089 00090 find_path ( 00091 BoostNumericBindings_INCLUDE_DIR 00092 NAMES boost/numeric/bindings/atlas/cblas.hpp 00093 HINTS ENV C_INCLUDE_PATH ENV CXX_INCLUDE_PATH 00094 PATH_SUFFIXES boost-numeric-bindings 00095 DOC "Root include directory of boost-numeric-bindings." 00096 ) 00097 00098 endif () 00099 00100 mark_as_advanced (BoostNumericBindings_INCLUDE_DIR) 00101 00102 # ---------------------------------------------------------------------------- 00103 # aliases / backwards compatibility 00104 if (BoostNumericBindings_INCLUDE_DIR) 00105 set (BoostNumericBindings_INCLUDE_DIRS "${BoostNumericBindings_INCLUDE_DIR}") 00106 set (BoostNumericBindings_INCLUDES "${BoostNumericBindings_INCLUDE_DIR}") 00107 endif () 00108 00109 # ---------------------------------------------------------------------------- 00110 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE 00111 # if all listed variables are found or TRUE 00112 include (FindPackageHandleStandardArgs) 00113 00114 find_package_handle_standard_args ( 00115 BoostNumericBindings 00116 REQUIRED_VARS 00117 BoostNumericBindings_INCLUDE_DIR 00118 ) 00119 00120 set (BoostNumericBindings_FOUND ${BOOSTNUMERICBINDINGS_FOUND}) 00121 00122 # ---------------------------------------------------------------------------- 00123 # set BoostNumericBindings_DIR 00124 if (NOT BoostNumericBindings_DIR AND BoostNumericBindings_FOUND) 00125 set ( 00126 BoostNumericBindings_DIR 00127 "${BoostNumericBindings_INCLUDE_DIR}" 00128 CACHE PATH 00129 "Installation prefix for NiftiCLib." 00130 FORCE 00131 ) 00132 endif ()