[CMake] Adding "*.obj" geometry files...
Daniel Dekkers
d.dekkers at cthrough.nl
Tue Jun 19 09:13:25 EDT 2012
Hi,
Although with the VS2008 generator setting the HEADER_FILE_ONLY property
works to exclude the files from the build, in VS2010 no such luck.
Am I doing something wrong in the syntax? Or is it a known issue with
VS2010?
We're doing this:
# Mark all resource files as HEADER_ONLY to avoid (for instance) Visual
Studio interpreting obj files as regular object files...
SET_SOURCE_FILES_PROPERTIES( ${RT_ALL_RSRC_FILES} PROPERTIES
HEADER_FILE_ONLY TRUE)
Also tried:
# Mark all resource files as HEADER_ONLY to avoid (for instance) Visual
Studio interpreting obj files as regular object files...
FOREACH( RSRC_FILE ${RT_ALL_RSRC_FILES} )
SET_SOURCE_FILES_PROPERTIES( ${RSRC_FILE} PROPERTIES
HEADER_FILE_ONLY TRUE )
ENDFOREACH()
Thanks,
Daniel
-----Oorspronkelijk bericht-----
Van: Petr Kmoch [mailto:petr.kmoch at gmail.com]
Verzonden: woensdag 13 juni 2012 8:10
Aan: Daniel Dekkers
CC: Bill Hoffman; cmake at cmake.org
Onderwerp: Re: [CMake] Adding "*.obj" geometry files...
Hi Daniel.
Yes, that's how Visual Studio shows excluded files. If you exclude a file by
setting its "Excluded from build" property manually, you get the same.
Petr
On Tue, Jun 12, 2012 at 8:31 PM, Daniel Dekkers <d.dekkers at cthrough.nl>
wrote:
> Ok, great, works.
> So I guess the little red stop-sign icons shown by Visual Studio
> denote that these files are excluded from the build?
>
> Thanks,
> Daniel
>
>
> -----Oorspronkelijk bericht-----
> Van: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Namens
> Bill Hoffman
> Verzonden: dinsdag 12 juni 2012 19:41
> Aan: cmake at cmake.org
> Onderwerp: Re: [CMake] Adding "*.obj" geometry files...
>
> On 6/12/2012 1:10 PM, Daniel Dekkers wrote:
>> Hi,
>>
>> We are adding some resource files (XML files, shaders, etc.) to a
>> Visual Studio project just to make them visible and accessible in the
IDE.
>>
>> We also add geometry files with the extension "obj". Visual Studio
>> treats these as regular object files and starts using them during the
> build.
>>
>> Is there a way that we can "label" these obj files so Visual Studio
>> leaves them alone?
>>
>> Kind Regards,
>>
>> Daniel Dekkers
>>
> Mark them as HEADER_FILE_ONLY .
>
>
> http://www.cmake.org/cmake/help/v2.8.8/cmake.html#prop_sf:HEADER_FILE_
> ONLY
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list