Using target_include_directories()

Alexander Neundorf neundorf at kde.org
Mon Mar 25 21:11:54 UTC 2013


On Monday 25 March 2013, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> >> >> > Also, does this apply to the BUILD and INSTALL interface
> >> >> 
> >> >> Yes, it applies to both, because it is not wrapped in either
> >> >> specifier. I can't think of any reason it would be appropriate for
> >> >> KDE to have something like that wrapped in BUILD_INTERFACE or
> >> >> INSTALL_INTERFACE.
> >> > 
> >> > I'm not sure I understand how you mean that.
> >> > Do you mean in general or specifically why the kdeui include dir
> >> > should be restricted to one of the two ?
> >> 
> >> I mean in general.
> >> 
> >> If target foo headers need target bar headers, then the bar include
> >> paths are needed whether foo is used in-build or from an installed
> >> location.
> > 
> > Something which is in PUBLIC applies to
> > * building itself
> > * being used in-project
> > * being used as imported target
> > 
> > The difference between the first two is not that big, putting an include
> > dir into PUBLIC BUILD_INTERFACE doesn't add dependencies for the project
> > compared to putting it into PRIVATE, so being sloppy there won't break
> > much typically.
> 
> *shrug*
> 
> I don't see much benefit in being sloppy.

Same here (I think I already mentioned that I don't like the PUBLIC keyword 
which makes being sloppy possible) ;-) 

> > But my question was actually the following: does the INSTALL interface of
> > kdeui end up in the INSTALL interface of kwidgets, and the BUILD
> > interface of kdeui goes into the BUILD interface of kwidgets ?
> 
> Not really. I think your question conveys a misunderstanding.
> 
> The interface include directories of kdeui are not copied into kwidgets.
> 
> It's more like a pointer, in c++ terms. If 'kdeui' is in the same
...
> Hopefully that answers your question. You seem to have started with some
> misunderstanding somewhere.

Yes, thanks :-)

Alex


More information about the Kde-buildsystem mailing list