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 option
s 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
fmt
version 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 BUILD_TZ_LIB
and USE_SYSTEM_TZ_DB
. How do I write Finddate.cmake
to do this?