Problem in importing into an external project with FFTW from MKL
FFTW is not found if we use MKL and no version of FFTW is installed in /usr/local
Found BLAS: /opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/lib/libmkl_intel_lp64.dylib;/opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/lib/libmkl_sequential.dylib;/opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/lib/libmkl_core.dylib;-lm;-ldl Found BLAS dependency. Checking for one of the modules 'fftw3' Looking for FFTW3 - not found using PkgConfig. Perhaps you should add the directory containing fftw3.pc to the PKG_CONFIG_PATH environment variable. [MFL/FFTW] fftw3 not found CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find FFTW (missing: FFTW_LIBRARIES FFTW_WORKS)
A solution In r scalfmmConfig.cmake
foreach(lib IN LISTS IMPORTED_LIBS)
if("${lib}" STREQUAL "FFTW")
message(STATUS "FFTW")
if("${BLA_VENDOR}" STREQUAL "Intel10_64lp_seq")
find_dependency(FFTW COMPONENTS MKL)
else()
find_dependency(FFTW)
endif()
else() find_dependency(${lib}) endif()