title: How to use all *.c files in a directory with the Cmake build system?
body: <p>I want to find all .c files under a directory and add them all to SRC files to compile in cmake. How can I do this in CMakeList.txt.</p>
  
  <p>for regular makefiles I can create </p>
  
  <pre><code>SPECIFIED_SRC_FILE  = $(foreach d,$(SPECIFIED_SRC_DIRS),$(wildcard $(addprefix $(d)/*,*.c)))
  </code></pre>
  
  <p>but I couldn't get how to do something like this in CMakeList.txt.</p>