[CMake] Including header files in project list

Brad King brad.king at kitware.com
Thu Jun 23 16:59:49 EDT 2005


Zachary Pincus wrote:
> I've been using CMake for a while on the UNIX side. Recently, tempted by 
> the new ability to generate XCode project files (great work, by the way! 
> Too bad Apple still hasn't documented the format), I switched a project 
> over to XCode.
> 
> Everything works great, but I can't figure out the "right" way to get 
> CMake to include header directories, or files within, to show up in 
> XCode's file list. I specified the header directories with 
> "INCLUDE_DIRECTORY" commands, but nothing else.
> 
> I suppose I could use AUX_SOURCE_DIRECTORY or something to convince 
> CMake that these headers and template definitions are sources, and thus 
> to include them in the XCode list. Is there a better way, however?

Just list the .h files as sources.  They will be ignored for the build 
but will show up in the files list.

-Brad


More information about the CMake mailing list