[CMake] Adding non .cpp or .h file to a visual studio project.

Joshua Jensen jjensen at workspacewhiz.com
Fri Nov 2 11:09:20 EDT 2007


Philip Lowman wrote:
> Josef Karthauser wrote:
>   
>> Hi there again,
>> I’m using cmake to create some visual studio projects, and want to
>> include some non-C files (config.txt for instance) into the vcproj file
>> so that my Visual Studio users can edit the file from within the IDE. 
>>   I can’t add them using ADD_LIBRARY or ADD_EXECUTABLE, so how do I
>> register them?
>>     
>
> This works for me on CMake 2.4.6 and Visual Studio 8:
>
> SET_SOURCE_FILES_PROPERTIES(readme.txt PROPERTIES HEADER_FILE_ONLY true)
> ADD_LIBRARY(foo foo.cc readme.txt)
>   
I tried it this morning, and I didn't even need the 
SET_SOURCE_FILES_PROPERTIES.

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071102/40673638/attachment.html


More information about the CMake mailing list