Detecting whether it is the top level by comparing the value of `CMAKE_SOURCE_DIR` with `CMAKE_CURRENT_SOURCE_DIR` is supported by all versions of CMake and is a very common pattern.
17 KiB
17 KiB