<div>I have this now in my CMakeLists.txt</div>
<div>&nbsp;</div>
<div>SOURCE_GROUP(&quot;CMake Makefile&quot; FILES CMakeLists.txt)<br>SOURCE_GROUP(&quot;Header Files&quot; REGULAR_EXPRESSION .*\.h)<br>SOURCE_GROUP(&quot;Source Files&quot; REGULAR_EXPRESSION .*\.cxx|.*\.cpp}<br>SOURCE_GROUP(&quot;Data Files&quot; REGULAR_EXPRESSION .*/data/.*)
<br clear="all"></div>
<div>&nbsp; ADD_EXECUTABLE(HelloWorld<br>&nbsp;&nbsp;&nbsp; HelloWorld.cxx<br>&nbsp;../data/earth.jpg)</div>
<div>&nbsp;</div>
<div>But it doesn't fits very well. :-(</div>
<div>I wish to select only files not contained in directories, and *.c files</div>
<div>capp.c</div>
<div>cxxapp.cxx</div>
<div>cppapp.cpp</div>
<div>&nbsp;</div>
<div>but not:</div>
<div>&nbsp;</div>
<div>/dir1/capp.c</div>
<div>/dir1/dir2/cxxapp.cxx</div>
<div>
<div>../cppapp.cpp</div></div>
<div>cnoapp.cxp</div>
<div>cnoapp.c.ext</div>
<div>cnoapp.cxx.rarefile.ext</div>
<div>&nbsp;</div>
<div>I have tried other &quot;regex&quot; but I don't known if I am wrong or CMake not supports ALL kind of regular expressions.</div>
<div>&nbsp;</div>
<div>Thanks.<br>-- <br>Un saludo,<br>&quot;Carlos Capdepón&quot; &lt;<a href="mailto:carlos.capdepon@gmail.com">carlos.capdepon@gmail.com</a>&gt; </div>