| 1 |
# - Try to find FFTW3 |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# FFTW3_FOUND - system has FFTW3 |
| 5 |
# FFTW3_INCLUDE_DIR - the FFTW3 include directory |
| 6 |
# FFTW3_LIBRARIES - Link these to use FFTW3 |
| 7 |
# FFTW3_VERSION_STRING - Human readable version number of fftw3 |
| 8 |
# FFTW3_VERSION_MAJOR - Major version number of fftw3 |
| 9 |
# FFTW3_VERSION_MINOR - Minor version number of fftw3 |
| 10 |
|
| 11 |
# Copyright (c) 2017, Ilia Platone, <[email protected]> |
| 12 |
# Based on FindLibfacile by Carsten Niehaus, <[email protected]> |
| 13 |
# |
| 14 |
# Redistribution and use is allowed according to the terms of the BSD license. |
| 15 |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
| 16 |
|
| 17 |
if (FFTW3_LIBRARIES) |
| 18 |
|
| 19 |
# in cache already |
| 20 |
set(FFTW3_FOUND TRUE) |
| 21 |
message(STATUS "Found FFTW3: ${FFTW3_LIBRARIES}") |
| 22 |
|
| 23 |
|
| 24 |
else (FFTW3_LIBRARIES) |
| 25 |
|
| 26 |
find_library(FFTW3_LIBRARIES NAMES fftw3 |
| 27 |
PATHS |
| 28 |
${_obLinkDir} |
| 29 |
${GNUWIN32_DIR}/lib |
| 30 |
/usr/local/lib |
| 31 |
) |
| 32 |
|
| 33 |
if(FFTW3_LIBRARIES) |
| 34 |
set(FFTW3_FOUND TRUE) |
| 35 |
else (FFTW3_LIBRARIES) |
| 36 |
set(FFTW3_FOUND FALSE) |
| 37 |
endif(FFTW3_LIBRARIES) |
| 38 |
|
| 39 |
|
| 40 |
if (FFTW3_FOUND) |
| 41 |
if (NOT FFTW3_FIND_QUIETLY) |
| 42 |
message(STATUS "Found FFTW3: ${FFTW3_LIBRARIES}") |
| 43 |
endif (NOT FFTW3_FIND_QUIETLY) |
| 44 |
else (FFTW3_FOUND) |
| 45 |
if (FFTW3_FIND_REQUIRED) |
| 46 |
message(FATAL_ERROR "FFTW3 not found. Please install libfftw3-dev") |
| 47 |
endif (FFTW3_FIND_REQUIRED) |
| 48 |
endif (FFTW3_FOUND) |
| 49 |
|
| 50 |
mark_as_advanced(FFTW3_LIBRARIES) |
| 51 |
|
| 52 |
endif (FFTW3_LIBRARIES) |