[CMake] How to create SOURCE_GROUP for include files

Brad King brad.king at kitware.com
Fri Jul 7 11:01:41 EDT 2006


Steve Johns wrote:
> Hi.
> 
> What I would like to accomplish:
> 
> In the MS VC7.1 .Net IDE
> 
> In the Solution Explorer, inside my project's folder, at the same level 
> as the 'Source Files' folder, I would like to create a 2nd folder 
> 'Include Files' that would contain/display the ".hpp" files for my project.
> 
> My source tree is just a simple setup with './src' and './incl' 
> directories containing the ".cpp" and ".hpp" files respectively.
> 
> __
> 
> I must be misunderstanding something fundamental about the 
> SOURCE_GROUP() command, or what is necessary for it to work, because 
> despite trying every variation of:
> 
> SOURCE_FILES( "Include Files" FILES  afile.hpp bfile.hpp )
> 
> that I can conceive of typing, absolutely nothing happens, and no 
> 'Include Files' appears in the IDE.

This just assigns a group to the source files, but they still have to be 
explicitly added to the source list of a target.

-Brad


More information about the CMake mailing list