Files
inspectrum/cmake/Modules/FindFFTW.cmake
Josh Blum 5daf134c17 changes to build under msvc and fftw find package
* define _LIBCPP_COMPLEX to typedef std::complex
* define _USE_MATH_DEFINES to enable M_PI and others
* provide MMAN_INCLUDE_DIR in sys/mman.h
  (we need to be able to set this manually)
* switch to find_package for FFTW,
  but added pkg-config support if thats needed,
  and fixed FFTW_LIBRARIES names to fftw3f
2017-11-23 01:57:29 -06:00

28 lines
839 B
CMake

# - Find FFTW
# Find the native FFTW includes and library
#
# FFTW_INCLUDES - where to find fftw3.h
# FFTW_LIBRARIES - List of libraries when using FFTW.
# FFTW_FOUND - True if FFTW found.
if (FFTW_INCLUDES)
# Already in cache, be silent
set (FFTW_FIND_QUIETLY TRUE)
endif (FFTW_INCLUDES)
find_package(PkgConfig)
pkg_check_modules(PC_FFTW QUIET fftw3f)
find_path (FFTW_INCLUDES fftw3.h
HINTS ${PC_FFTW_INCLUDEDIR} ${PC_FFTW_INCLUDE_DIRS})
find_library (FFTW_LIBRARIES NAMES fftw3f
HINTS ${PC_FFTW_LIBDIR} ${PC_FFTW_LIBRARY_DIRS})
# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)