How CMake's find_package Really Works: A Worked Example with Threads
CMake's find_package is a cached search that yields imported targets. A worked Threads example shows how REQUIRED, version checks, cache resets, and verbose link inspection prevent the usual integration failures.