Static build fail with fftw

GROMACS version: 2023
GROMACS modification: Yes/No

Hi,
Anyone get the following error: when linking to fftw with its static library? I am on a mac, and it seems like I can’t just link the dependencies/

ERROR:
CMake Error at cmake/FindFFTW.cmake:104 (message):
Could not find fftwf_plan_many_[r2c|c2r] in
/opt/homebrew/opt/fftw/lib/libfftw3.a;/Users/afiqhatta/molecular_sim/gromacs-2023.2/build/m,
take a look at the error message in
/Users/afiqhatta/molecular_sim/gromacs-2023.2/CMakeFiles/CMakeError.log to
find out what went wrong. If you are using a static lib (.a) make sure you
have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
-DFFTWF_LIBRARY=‘/path/to/libfftw3f.so;/path/to/libm.so’) !
Call Stack (most recent call first):
cmake/gmxManageFFTLibraries.cmake:64 (find_package)
CMakeLists.txt:842 (include)

Command - building with cp2k
cmake … -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_FFT_LIBRARY=fftw3 -DFFTWF_LIBRARY=‘/opt/homebrew/opt/fftw/lib/libfftw3.a;m’ -DFFTWF_INCLUDE_DIR=‘/opt/homebrew/opt/fftw/include/’ -DGMX_BLAS_USER=‘/opt/homebrew/opt/openblas/lib/libblas.a’ -DGMX_LAPACK_USER=‘/opt/homebrew/opt/openblas/lib/liblapack.a’ -DGMX_CP2K=ON -DCP2K_DIR=‘/private/tmp/libcp2k-20231015-27884-j35xo1/cp2k-2023.2/lib/Darwin-gfortran/ssmp/’