2 # Find the native Fftw3 includes and library
4 # FFTW3_INCLUDE_DIRS, where to find fftw3.h, Set when
5 # FFTW3_INCLUDE_DIR is found.
6 # FFTW3_LIBRARIES, libraries to link against to use Fftw3.
7 # FFTW3_ROOT_DIR, The base directory to search for Fftw3.
8 # This can also be an environment variable.
9 # FFTW3_FOUND, If false, do not try to use Fftw3.
11 # also defined, but not for general use are
12 # FFTW3_LIBRARY, where to find the Fftw3 library.
14 #=============================================================================
15 # Copyright 2011 Blender Foundation.
17 # Distributed under the OSI-approved BSD License (the "License");
18 # see accompanying file Copyright.txt for details.
20 # This software is distributed WITHOUT ANY WARRANTY; without even the
21 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 # See the License for more information.
23 #=============================================================================
25 # If FFTW3_ROOT_DIR was defined in the environment, use it.
26 IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "")
27 SET(FFTW3_ROOT_DIR $ENV{FFTW3_ROOT_DIR})
30 SET(_fftw3_SEARCH_DIRS
34 /opt/local # DarwinPorts
38 FIND_PATH(FFTW3_INCLUDE_DIR
47 FIND_LIBRARY(FFTW3_LIBRARY
56 # handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if
57 # all listed variables are TRUE
58 INCLUDE(FindPackageHandleStandardArgs)
59 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
60 FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
63 SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
64 SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})