1 ##------------------------------------------------------------------------------
2 ## $Id: FindFFTW3.cmake,v 1.3 2011/01/04 23:31:32 norwin Exp $
3 ##------------------------------------------------------------------------------
5 # - Check for the presence of FFTW3
7 # The following variables are set when FFTW3 is found:
8 # HAVE_FFTW3 = Set to true, if all components of FFTW3
10 # FFTW3_INCLUDES = Include path for the header files of FFTW3
11 # FFTW3_LIBRARIES = Link these to use FFTW3
13 ## -----------------------------------------------------------------------------
14 ## Check for the header files
16 FIND_PATH (FFTW3_INCLUDES fftw3.h
17 PATHS /usr/local/include /usr/include /sw/include
20 ## -----------------------------------------------------------------------------
21 ## Check for the library
23 FIND_LIBRARY (FFTW3_LIBRARIES fftw3 fftw
24 PATHS /usr/local/lib /usr/lib /lib /sw/lib
27 ## -----------------------------------------------------------------------------
28 ## Actions taken when all components have been found
30 IF (FFTW3_INCLUDES AND FFTW3_LIBRARIES)
32 ELSE (FFTW3_INCLUDES AND FFTW3_LIBRARIES)
33 IF (NOT FFTW3_FIND_QUIETLY)
34 IF (NOT FFTW3_INCLUDES)
35 MESSAGE (STATUS "Unable to find FFTW3 header files!")
36 ENDIF (NOT FFTW3_INCLUDES)
37 IF (NOT FFTW3_LIBRARIES)
38 MESSAGE (STATUS "Unable to find FFTW3 library files!")
39 ENDIF (NOT FFTW3_LIBRARIES)
40 ENDIF (NOT FFTW3_FIND_QUIETLY)
41 ENDIF (FFTW3_INCLUDES AND FFTW3_LIBRARIES)
44 IF (NOT FFTW3_FIND_QUIETLY)
45 MESSAGE (STATUS "Found components for FFTW3")
46 MESSAGE (STATUS "FFTW3_INCLUDES = ${FFTW3_INCLUDES}")
47 MESSAGE (STATUS "FFTW3_LIBRARIES = ${FFTW3_LIBRARIES}")
48 ENDIF (NOT FFTW3_FIND_QUIETLY)
50 IF (FFTW3_FIND_REQUIRED)
51 MESSAGE (FATAL_ERROR "Can not find FFTW3 library !")
52 ENDIF (FFTW3_FIND_REQUIRED)
55 ## ------------------------------------------------------------------------------
56 ## Mark as advanced ...