File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1- # FindFFTW.cmake — robust FFTW detection for system installs & CI
1+ # Generic and robust FindFFTW.cmake
22
33find_package (PkgConfig QUIET )
44if (PkgConfig_FOUND)
55 pkg_check_modules(PC_FFTW QUIET fftw3)
66endif ()
77
8- # Search for the include directory
8+ # Look for FFTW headers
99find_path (FFTW_INCLUDE_DIR
1010 NAMES fftw3.h
1111 HINTS
1212 ${PC_FFTW_INCLUDE_DIRS}
13+ PATHS
1314 /usr/include
1415 /usr/local/include
1516 /opt/include
17+ /usr/include /x86_64-linux-gnu
1618)
1719
18- # Search for the library
20+ # Look for FFTW library
1921find_library (FFTW_LIBRARY
2022 NAMES fftw3
2123 HINTS
2224 ${PC_FFTW_LIBRARY_DIRS}
25+ PATHS
2326 /usr/lib
2427 /usr/lib64
2528 /usr/local/lib
2629 /opt/lib
2730 /usr/lib/x86_64-linux-gnu
2831)
2932
30- # Import handling
3133include (FindPackageHandleStandardArgs)
3234
35+ # Use version info only if it's defined and not empty
3336if (DEFINED PC_FFTW_VERSION AND NOT "${PC_FFTW_VERSION} " STREQUAL "" )
3437 find_package_handle_standard_args(FFTW
3538 REQUIRED_VARS FFTW_LIBRARY FFTW_INCLUDE_DIR
@@ -43,7 +46,7 @@ endif()
4346
4447mark_as_advanced (FFTW_INCLUDE_DIR FFTW_LIBRARY)
4548
46- # Optional modern target alias
49+ # Optional modern imported target
4750if (FFTW_FOUND AND NOT TARGET FFTW::FFTW)
4851 add_library (FFTW::FFTW UNKNOWN IMPORTED )
4952 set_target_properties (FFTW::FFTW PROPERTIES
You can’t perform that action at this time.
0 commit comments