summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindFFTW3f.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindFFTW3f.cmake')
-rw-r--r--cmake/Modules/FindFFTW3f.cmake15
1 files changed, 6 insertions, 9 deletions
diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake
index d84bb37a8..e8b581aed 100644
--- a/cmake/Modules/FindFFTW3f.cmake
+++ b/cmake/Modules/FindFFTW3f.cmake
@@ -1,14 +1,16 @@
# http://tim.klingt.org/code/projects/supernova/repository/revisions/d336dd6f400e381bcfd720e96139656de0c53b6a/entry/cmake_modules/FindFFTW3f.cmake
+# Modified to use pkg config and use standard var names
+
# Find single-precision (float) version of FFTW3
INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(FFTW3F "fftw3f >= 3.0")
-IF(NOT FFTW3F_FOUND)
+PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0" QUIET)
FIND_PATH(
FFTW3F_INCLUDE_DIRS
NAMES fftw3.h
HINTS $ENV{FFTW3_DIR}/include
+ ${PC_FFTW3F_INCLUDE_DIRS}
PATHS /usr/local/include
/usr/include
)
@@ -17,16 +19,11 @@ FIND_LIBRARY(
FFTW3F_LIBRARIES
NAMES fftw3f libfftw3f
HINTS $ENV{FFTW3_DIR}/lib
+ ${PC_FFTW3F_LIBRARIES}
PATHS /usr/local/lib
/usr/lib
)
-SET(FFTW3F_FOUND "NO")
-
-IF( FFTW3F_INCLUDE_DIRS AND FFTW3F_LIBRARIES )
- SET(FFTW3F_FOUND "YES")
-ENDIF()
-
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS)
-ENDIF(NOT FFTW3F_FOUND)
+MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS)