Introduced in D5608.
Backport of core PR16691.
Only commit 2483266
(https://github.com/bitcoin/bitcoin/pull/16691/commits/2483266c591f7b2e62df68ee2d13740a706415ec)
is applicable for us, since the first one is autotools documentation
while we recommand cmake.