hackrf/host/cmake/modules/FindFFTW.cmake
Fabrice Fontaine 3e32f46c79 cmake/modules/FindFFTW.cmake: fix build without fftw3
Build on Linux fails if libfftw3 is not available since commit
a8c1fc92e9
which replaced
pkg_check_modules(FFTW REQUIRED fftw3f)
by
find_package(FFTW REQUIRED)

Fix this build failure by updating FindFFTW.cmake to check for fftw3f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-10-15 23:42:03 +02:00

31 lines
796 B
CMake

# - Find FFTW
# Find the native FFTW includes and library
#
# FFTW_INCLUDES - where to find fftw3.h
# FFTW_LIBRARIES - List of libraries when using FFTW.
# FFTW_FOUND - True if FFTW found.
if (FFTW_INCLUDES)
# Already in cache, be silent
set (FFTW_FIND_QUIETLY TRUE)
endif (FFTW_INCLUDES)
find_path (FFTW_INCLUDES fftw3.h)
IF (WIN32)
include_directories(${FFTW_INCLUDES})
find_library (FFTW_LIBRARIES NAMES ${FFTW_LIBRARIES})
ELSE(WIN32)
find_library (FFTW_LIBRARIES NAMES fftw3f)
ENDIF(WIN32)
# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)