When AOCL-FFTZ is built with BUILD_THIRD_PARTY_WRAPPERS=ON, it installs an FFTW3-compatible CMake config under <install-prefix>/lib/cmake/FFTW3/ (FFTW3Config.cmake, FFTW3ConfigVersion.cmake, FFTW3Targets.cmake). This allows projects that use find_package(FFTW3) to link against the AOCL-FFTZ FFTW wrapper; the config pulls in libaocl_fftz automatically.
Set the target application’s CMAKE_PREFIX_PATH to the AOCL-FFTZ install prefix (or set FFTW3_DIR to <install-prefix>/lib/cmake/FFTW3), then in the target application’s CMakeLists.txt:
find_package(FFTW3 REQUIRED)
# Link using the target that matches how your code links (all are the same wrapper library):
target_link_libraries(target_app PRIVATE FFTW3::fftw3) # double precision
# target_link_libraries(target_app PRIVATE FFTW3::fftw3f) # single precision (alias)
# target_link_libraries(target_app PRIVATE FFTW3::fftw3_omp) # double, OpenMP name (alias)
# target_link_libraries(target_app PRIVATE FFTW3::fftw3f_omp) # single, OpenMP name (alias)
FFTW3::fftw3 is the main target; FFTW3::fftw3f, FFTW3::fftw3_omp, and FFTW3::fftw3f_omp are provided as aliases to maintain compatibility with code that links against -lfftw3f, -lfftw3_omp, or -lfftw3f_omp. Depending on the application’s requirements, one of the above targets is selected. find_package(FFTW3) automatically brings in aocl-fftz, eliminating the need to link libaocl_fftz manually.