ThirdPartyFFTW.cmake 851 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# FFTW
SET(NEKTAR_USE_FFTW   OFF CACHE BOOL 
    "Use FFTW routines for performing the Fast Fourier Transform.")
SET(THIRDPARTY_BUILD_FFTW OFF CACHE BOOL
    "Build FFTW from ThirdParty")

IF( NEKTAR_USE_FFTW )
    IF (THIRDPARTY_BUILD_FFTW)
        INCLUDE(ExternalProject)
        
        EXTERNALPROJECT_ADD(
            fftw-3.2.2
            PREFIX ${TPSRC}
            URL ${TPURL}/fftw-3.2.2.tar.gz
            URL_MD5 "b616e5c91218cc778b5aa735fefb61ae"
            DOWNLOAD_DIR ${TPSRC}
            CONFIGURE_COMMAND ${TPSRC}/src/fftw-3.2.2/configure --prefix=${TPSRC}/dist --quiet --enable-shared --disable-dependency-tracking
        )
19
        SET(FFTW_LIB fftw3)
20 21 22 23 24 25
        INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
    ELSE ()
        INCLUDE (FindFFTW)
        INCLUDE_DIRECTORIES(${FFTW_INCLUDE_DIR})
    ENDIF()
ENDIF( NEKTAR_USE_FFTW )