How to use all *.c files in a directory with the Cmake build system? January 22, 2023 by Tarik How about the good old globbing? FILE(GLOB MyCSources *.c) ADD_EXECUTABLE(MyExecutable ${MyCSources})