How to be able to choose Debug or Release build in CMake

Hi all

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?

Kind regards