2 # Find the native FFTW3 includes and library, single precision
4 # FFTW3F_INCLUDE_DIR - where to find fftw3.h
5 # FFTW3F_LIBRARIES - List of libraries when using FFTW.
6 # FFTW3F_FOUND - True if FFTW found.
8 # The FFTW3F root installation directory can be provided in the FFTW3F_ROOT_DIR
10 if (FFTW3F_INCLUDE_DIR AND FFTW3F_LIBRARIES)
11 # Already in cache, be silent
12 set (FFTW3F_FIND_QUIETLY TRUE)
13 endif (FFTW3F_INCLUDE_DIR AND FFTW3F_LIBRARIES)
15 file(TO_CMAKE_PATH "$ENV{FFTW3F_ROOT_DIR}" _env_FFTW3F_ROOT_DIR)
17 find_path (FFTW3F_INCLUDE_DIR fftw3.h
18 PATHS "${_env_FFTW3F_ROOT_DIR}/include"
19 CACHE STRING "Path to single precision FFTW3 headers")
21 find_library (FFTW3F_LIBRARIES
23 PATHS "${_env_FFTW3F_ROOT_DIR}/lib"
24 "${FFTW3F_INCLUDE_DIR}/../lib"
25 CACHE STRING "Single precision FFTW3 libraries")
27 # handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
28 # all listed variables are TRUE
29 include (FindPackageHandleStandardArgs)
30 set(__MSG "Could not find FFTW3F. Provide the fftw3 install directory in the FFTW3F_ROOT_DIR environment variable.")
31 find_package_handle_standard_args (FFTW3F ${__MSG} FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIR)
33 mark_as_advanced (FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIR)