There are a couple of great posts I came across that saved me a lot of headaches trying to make sense of CMake, and probably would have answered the question above
https://iamsorush.com/posts/cpp-cmake-essential/
https://iamsorush.com/posts/cpp-cmake-build/
They clearly explain step-by-step what CMake is actually doing as it executes the commands in the CMakeLists.txt files of a project, and they also show how to print out current directories, etc. to verify that the commands are executed as intended - one can see how any project structure (pitchfork or otherwise) can be constructed, and exactly how to write and arrange the corresponding CMakeLists.txt files.
In my opinion, this kind of discussion should be in the first few chapters of any intro. book on CMake. I'm new to CMake, and these two posts answered every basic question I had about how to set up a project for my own code. From my experience searching around, I'd say that at least 70 percent of the questions out there on how to start a CMake project are answered by these two posts.
See what you think. I only mention this because I think it might help to circulate these links in future comments.