[CMake] moc includes from source directory

Alexander Neundorf a.neundorf-work at gmx.net
Wed Dec 20 04:24:36 EST 2006


Von: Craig Bradney <cbradney at zip.com.au>

> On Monday 18 December 2006 19:40, Alexander Neundorf wrote:
> > Von: Craig Bradney <cbradney at zip.com.au>
> >
> > > Hi,
> > >
> > > I'm wondering if theres an option or setting I have missed for outof
> > > source builds.
> > >
> > > When you build Scribus out of source, and the source directory has
> been
> > > used
> > > for building in-source with autotools, the moc files from the source
> > > directory are used instead of cmake creating them in its own
> directories
> > > in the build dir.
> > >
> > > Any ideas (apart from building autotools in another location)?
> >
> > No, no other ideas. Make sure that your source dir is clean. When
> building
> > out-of-source with CMake, you have to ensure that the source dir is
> clean.
> > Otherwise this can lead to strange problems.
> 
> Well this is what I wonder, is a moc file considered source, or a
> generated 
> file by the cmake system.. its kind of both, however, the moc files when 
> building out of source should be looked for in the build directory, no?

Since they are included in the source files, it's preprocessor who looks for them, and this only depends on the order of include directories.
If you get the order right, it should work, but I wouldn't do this, it can lead only to problems (as you are experiencing right now).

Bye
Alex

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the CMake mailing list