I placed the main CMakeLists.txt in the root folder, this creates an executable. In ./imgui/CMakeLists.txt I would like this CMakeList to point to specific cpp files so that root can compile the executable with them.
Have you considered making the imgui/ folder a static or object library with its own sources and then linking your top-level executable to that?
Otherwise you could just add the sources found in the subdirectory in the top-level CMakeLists. Nothing says you must put a CMakeLists in every sub folder.
Alternatively you could use target_sources in the subdirectory (having created the initial target in the top level).
target_sources seems like the worst option to me though—keeping everything in the top level makes it very obvious what your exe depends on, and treating imgui/ as a separate library instead would be a great way to separate easily-testable/reusable/isolated code from your app code.