DSView/CMake/FindFFTW.cmake

48 lines
893 B
CMake
Raw Normal View History

2016-08-11 13:02:28 +08:00
# - Find FFTW
# Find the native FFTW includes and library
# This module defines
# FFTW_INCLUDE_DIR, where to find fftw3.h, etc.
# FFTW_LIBRARIES, the libraries needed to use FFTW.
# FFTW_FOUND, If false, do not try to use FFTW.
# also defined, but not for general use are
# FFTW_LIBRARY, where to find the FFTW library.
FIND_PATH(FFTW_INCLUDE_DIR
NAMES
fftw3.h
PATHS
/usr/local/include
/opt/local/include
/usr/include
2016-08-11 13:02:28 +08:00
)
SET(FFTW_NAMES ${FFTW_NAMES} fftw3 fftw3f fftw3l fftw3-3)
2016-08-11 13:02:28 +08:00
FIND_LIBRARY(FFTW_LIBRARY
NAMES
${FFTW_NAMES}
PATHS
/usr/local/lib64
/opt/local/lib64
/usr/lib64
/usr/local/lib
/opt/local/lib
/usr/lib
2016-08-11 13:02:28 +08:00
)
2022-03-09 17:06:51 +08:00
if (FFTW_INCLUDE_DIR AND FFTW_LIBRARY)
set (FFTW_FOUND TRUE)
set(FFTW_INCLUDE_DIRS
${FFTW_INCLUDE_DIR}
)
2022-05-16 16:51:19 +08:00
set(FFTW_LIBRARIES
2022-03-09 17:06:51 +08:00
${FFTW_LIBRARY}
)
2022-05-16 16:51:19 +08:00
2022-03-09 17:06:51 +08:00
endif(FFTW_INCLUDE_DIR AND FFTW_LIBRARY)