This recipe demonstrated how to download, build, and install an external project whose build system is managed by CMake. In contrast to the previous recipe, where a custom build system had to be used, this superbuild setup is rather compact. It is important to note the use of the CONFIG option to the find_package command; this tells CMake to first look for a FFTW3Config.cmake file in order to locate the FFTW3 library. Such a file exports the library as a target to be picked up by third-party projects. The target contains the version, configuration, and location of the library, that is, complete information on how the target was configured and built. In case the library is not installed on the system, we need to tell CMake where the FFTW3Config.cmake file is located. This can be done by setting the FFTW3_DIR variable. This was the very last step in the external/upstream/fftw3/CMakeLists.txt file, where, by using the GNUInstallDirs.cmake module, we set FFTW3_DIR as a cache variable to be picked up later on in the superbuild.