I’ve spent the past three days trying to figure out what’s wrong with me since I was unable to find my installed project using the find_package()
command but ultimately I think I was misled by tutorial in the official documentation.
Unless I’m missing something, installing the config file to ${CMAKE_INSTALL_PREFIX}/lib/cmake
makes it impossible for the aforementioned command to find the config file, at least on Windows. Changing DESTINATION
and INSTALL_DESTINATION
to cmake
solves the issue.
This is the doc I’m referring to.