CAKE_SOURCE_DIR is set by CMake at configuration time. It is the root of the source tree (the path given to CMake at configuration). In this case it always will be the src folder.