[CMake] Omit include directories from resource files

Robert Dailey rcdailey.lists at gmail.com
Tue Jun 26 19:10:09 EDT 2012


On Tue, Jun 26, 2012 at 5:29 PM, David Cole <david.cole at kitware.com> wrote:

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


I have a complex system in place that makes dependency include directories
transitive (much like how library dependencies behave in CMake, except the
same logic does not exist for include directories). Unfortunately I won't
be able to reliably cut down on the number of include directories without
potentially breaking the code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120626/84fef9ec/attachment.htm>


More information about the CMake mailing list