| 1 |
# - Find FFTW |
| 2 |
# Find the native FFTW includes and library |
| 3 |
# |
| 4 |
# FFTW_INCLUDES - where to find fftw3.h |
| 5 |
# FFTW_LIBRARIES - List of libraries when using FFTW. |
| 6 |
# FFTW_FOUND - True if FFTW found. |
| 7 |
|
| 8 |
if (FFTW_INCLUDES) |
| 9 |
# Already in cache, be silent |
| 10 |
set (FFTW_FIND_QUIETLY TRUE) |
| 11 |
endif (FFTW_INCLUDES) |
| 12 |
|
| 13 |
find_package(PkgConfig) |
| 14 |
pkg_check_modules(PC_FFTW QUIET fftw3f) |
| 15 |
|
| 16 |
find_path (FFTW_INCLUDES fftw3.h |
| 17 |
HINTS ${PC_FFTW_INCLUDEDIR} ${PC_FFTW_INCLUDE_DIRS}) |
| 18 |
|
| 19 |
find_library (FFTW_LIBRARIES NAMES fftw3f |
| 20 |
HINTS ${PC_FFTW_LIBDIR} ${PC_FFTW_LIBRARY_DIRS}) |
| 21 |
|
| 22 |
# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if |
| 23 |
# all listed variables are TRUE |
| 24 |
include (FindPackageHandleStandardArgs) |
| 25 |
find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES) |
| 26 |
|
| 27 |
mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES) |