How do I configure build or debug releases for a multi directory project, cross compiling project with CMakeLists.txt for each of the directories. Do I do this in CMakePresets.json or pass it as a command, and if so how? Or do I make chnges in my app directory or in my root CMakeLists, the one where all the other directories are added as subdirectories?
The way to select a configuration (e.g. Debug, Release) when running CMake with a single-config generator (such as Ninja) is to define the CMake variable CMAKE_BUILD_TYPE to the desired value. This can be done in the CMake UI you are using, or on the CMake command line with -DCMAKE_BUILD_TYPE=Debug. It can also be set in a preset.