Let’s say I have a project which wants to use spdlog, which depends on fmtlib.
The main spdlog CMakeLists.txt has a bunch of
options for how to configure it, including
SPDLOG_FMT_EXTERNAL. Let’s say I:
- want to clone spdlog from source, and
- want to provide my own
fmtversion and then I want to tell spdlog to use that.
What is the right way to write
Findspdlog.cmake to clone the repo and to set
SPDLOG_FMT_EXTERNAL so that it does the right thing?
Or, for a different example of the same idea, we could look at date and the desire to set
USE_SYSTEM_TZ_DB. How do I write
Finddate.cmake to do this?