cmake-examples
cmake-examples copied to clipboard
Add FetchContent example(s)
I've been using FetchContent a lot recently, and it works pretty well. It would be good to provide an example of how it works for those learning. Also, it should include some of the content from the Integrating with find_package section of the manual.
There are a few cases that could be covered:
- Dependency has no dependencies
- Override dependency's
find_package
calls - Defer to
find_package
calls when available - Order multiple dependencies correctly
- Set CMake options for a dependency, e.g. enabling specific components