<div class="gmail_quote">On Wed, Apr 29, 2009 at 2:27 PM, Hicham Mouline <span dir="ltr">&lt;<a href="mailto:hicham@mouline.org">hicham@mouline.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I use cmake to generate a VS2005 solution as well as linux/g++ makefiles.<br>
I have a directory containing headers only and subdirs also with headers<br>
only,<br>
However I wish to display 1 project for that directory, and filters 1 for<br>
each of the subdirs.<br>
There is nothing to build for that dir, but I wish to show it in VS2005.<br>
<br>
How to do?</blockquote><div><br>Firstly, don&#39;t use CMake 2.6.3 for this because it won&#39;t work (there is a bug).  Use 2.6.2 or the latest 2.6.4RC.<br><br>set(A_HDRS A/one.h A/two.h A/three.h)<br>source_group(A FILES ${A_HDRS})<br>
add_executable(HeaderFiles dummy.c ${A_HDRS} EXCLUDE_FROM_ALL)<br><br>If that works successfully, you can use the file(GLOB..) command to determine A_HDRS without listing every header file and then add B_HDRS, C_HDRS, etc. as needed.<br>
<br>Obviously for dummy.c just use:<br><br>int main() { return 0; }<br></div></div><br>-- <br>Philip Lowman<br>