I am looking for a way to get the compilation and linking flags for an installed CMake package (that can be found with
find_package), and use them in a non-CMake project. Does CMake provide a reasonably simple way to do this?
I found the
cmake --find-package option, but the documentation states that it should not be used. Also, it does not seem to work in all cases.
I am not looking for a universal solution that will print the flags for any package, merely a starting point to implement a solution that can get the flags for one particular package.