1 ############################################################################## 2 # @file FindMatlabNiftiTools.cmake 3 # @brief Find MATLAB Central package "Tools for NIfTI and ANALYZE Image" (#8797). 5 # @par Input variables: 8 # @tp @b MatlabNiftiTools_DIR @endtp 9 # <td>The MATLAB Central package files are searched under the specified 10 # root directory. If they are not found there, the default search 11 # paths are considered. This variable can also be set as 12 # environment variable.</td> 15 # @tp @b MATLABNIFTITOOLS_DIR @endtp 16 # <td>Alternative environment variable for @p MatlabNiftiTools_DIR.</td> 20 # @par Output variables: 23 # @tp @b MatlabNiftiTools_FOUND @endtp 24 # <td>Whether the package was found and the following CMake variables are valid.</td> 27 # @tp @b MatlabNiftiTools_INCLUDE_DIR @endtp 28 # <td>Cached include directory/ies only related to the searched package.</td> 31 # @tp @b MatlabNiftiTools_INCLUDE_DIRS @endtp 32 # <td>Include directory/ies of searched and dependent packages (not cached).</td> 35 # @tp @b MatlabNiftiTools_INCLUDES @endtp 36 # <td>Alias for MatlabNiftiTools_INCLUDE_DIRS (not cached).</td> 40 # @ingroup CMakeFindModules 41 ############################################################################## 43 #============================================================================= 44 # Copyright 2011-2012 University of Pennsylvania 45 # Copyright 2013-2016 Andreas Schuh <andreas.schuh.84@gmail.com> 47 # Distributed under the OSI-approved BSD License (the "License"); 48 # see accompanying file Copyright.txt for details. 50 # This software is distributed WITHOUT ANY WARRANTY; without even the 51 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 52 # See the License for more information. 53 #============================================================================= 54 # (To distribute this file outside of CMake, substitute the full 55 # License text for the above reference.) 57 # ---------------------------------------------------------------------------- 60 if (NOT $ENV{MATLABNIFTITOOLS_DIR} STREQUAL
"")
61 set (MatlabNiftiTools_DIR
"$ENV{MATLABNIFTITOOLS_DIR}" CACHE PATH
"Installation prefix for MATLAB NIfTI tools." FORCE)
63 set (MatlabNiftiTools_DIR
"$ENV{MatlabNiftiTools_DIR}" CACHE PATH
"Installation prefix for MATLAB NIfTI tools." FORCE)
67 # ---------------------------------------------------------------------------- 69 if (MatlabNiftiTools_DIR)
72 MatlabNiftiTools_INCLUDE_DIR
74 HINTS ${MatlabNiftiTools_DIR}
75 DOC
"path to directory containing load_nii.m" 82 MatlabNiftiTools_INCLUDE_DIR
85 DOC
"path to directory containing load_nii.m" 90 # ---------------------------------------------------------------------------- 91 # append paths / libraries of packages this package depends on 92 if (MatlabNiftiTools_INCLUDE_DIR)
97 # ---------------------------------------------------------------------------- 98 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE 99 # if all listed variables are found or TRUE 100 include (FindPackageHandleStandardArgs)
102 find_package_handle_standard_args (
105 MatlabNiftiTools_INCLUDE_DIR
110 # ---------------------------------------------------------------------------- 111 # set MatlabNiftiTools_DIR 112 if (NOT MatlabNiftiTools_DIR AND MatlabNiftiTools_FOUND) 113 set (MatlabNiftiTools_DIR "${MatlabNiftiTools_INCLUDE_DIR}
" CACHE PATH "Installation prefix
for MATLAB NIfTI tools.
" FORCE)