[CMake] Omit include directories from resource files

David Cole david.cole at kitware.com
Tue Jun 26 18:29:59 EDT 2012


On Tue, Jun 26, 2012 at 5:51 PM, Robert Dailey <rcdailey.lists at gmail.com> wrote:
> I'm including a Windows resource file (*.rc) in my add_executable() command,
> but in VS2003 the build fails with RC1102 because all of my include
> directories (and there are a TON) are being added to the resource file when
> it is compiled. I don't need the include directories for the resource files,
> so how can I remove them from only the RC files?
>
> I know 2.8.8 has include directories as a target property, but can I use
> this as a source property, and just set it to blank to erase the include
> dirs?
>

No, at this point, it's only a target property, not a source property.

The best way around this problem, while it's not an easy solution, is
to reduce the number of your include directories.

Has anybody else out there worked around this problem in another way?


HTH,
David


> --
>
> 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