X-Git-Url: http://git.johnwright.org/?p=fmit.git;a=blobdiff_plain;f=cmake%2FFindFFTW3.cmake;fp=cmake%2FFindFFTW3.cmake;h=25929fb63dee299a3df14b0f5580add9f632980f;hp=0000000000000000000000000000000000000000;hb=a8fb82288feb6b258f2c04312f0c36ba8d79b494;hpb=adfba0402927438a1869f1e716bcf0e25574ce1e diff --git a/cmake/FindFFTW3.cmake b/cmake/FindFFTW3.cmake new file mode 100644 index 0000000..25929fb --- /dev/null +++ b/cmake/FindFFTW3.cmake @@ -0,0 +1,56 @@ +##------------------------------------------------------------------------------ +## $Id: FindFFTW3.cmake,v 1.3 2011/01/04 23:31:32 norwin Exp $ +##------------------------------------------------------------------------------ + +# - Check for the presence of FFTW3 +# +# The following variables are set when FFTW3 is found: +# HAVE_FFTW3 = Set to true, if all components of FFTW3 +# have been found. +# FFTW3_INCLUDES = Include path for the header files of FFTW3 +# FFTW3_LIBRARIES = Link these to use FFTW3 + +## ----------------------------------------------------------------------------- +## Check for the header files + +FIND_PATH (FFTW3_INCLUDES fftw3.h + PATHS /usr/local/include /usr/include /sw/include + ) + +## ----------------------------------------------------------------------------- +## Check for the library + +FIND_LIBRARY (FFTW3_LIBRARIES fftw3 fftw + PATHS /usr/local/lib /usr/lib /lib /sw/lib + ) + +## ----------------------------------------------------------------------------- +## Actions taken when all components have been found + +IF (FFTW3_INCLUDES AND FFTW3_LIBRARIES) + SET (HAVE_FFTW3 TRUE) +ELSE (FFTW3_INCLUDES AND FFTW3_LIBRARIES) + IF (NOT FFTW3_FIND_QUIETLY) + IF (NOT FFTW3_INCLUDES) + MESSAGE (STATUS "Unable to find FFTW3 header files!") + ENDIF (NOT FFTW3_INCLUDES) + IF (NOT FFTW3_LIBRARIES) + MESSAGE (STATUS "Unable to find FFTW3 library files!") + ENDIF (NOT FFTW3_LIBRARIES) + ENDIF (NOT FFTW3_FIND_QUIETLY) +ENDIF (FFTW3_INCLUDES AND FFTW3_LIBRARIES) + +IF (HAVE_FFTW3) + IF (NOT FFTW3_FIND_QUIETLY) + MESSAGE (STATUS "Found components for FFTW3") + MESSAGE (STATUS "FFTW3_INCLUDES = ${FFTW3_INCLUDES}") + MESSAGE (STATUS "FFTW3_LIBRARIES = ${FFTW3_LIBRARIES}") + ENDIF (NOT FFTW3_FIND_QUIETLY) +ELSE (HAVE_FFTW3) + IF (FFTW3_FIND_REQUIRED) + MESSAGE (FATAL_ERROR "Can not find FFTW3 library !") + ENDIF (FFTW3_FIND_REQUIRED) +ENDIF (HAVE_FFTW3) + +## ------------------------------------------------------------------------------ +## Mark as advanced ...