[cmake-developers] EXPORT_NAME-genex
Alexander Neundorf
neundorf at kde.org
Thu May 23 13:02:01 EDT 2013
On Thursday 23 May 2013, Stephen Kelly wrote:
> Alexander Neundorf wrote
>
> >> So, I don't think we should pretent they don't exist, or try to hide the
> >> fact that they exist.
> >
> > How is this related to using the target names directly ?
>
> If he really wants the location of the binary, he needs to use
>
> get_target_property(loc Qt4::QtUiTools LOCATION)
>
> Using
>
> get_target_property(loc ${QT_UITOOLS_LIBRARY} LOCATION)
>
> could have unpredictable results if that variable becomes a list of things.
> For consistency within a project, the imported target name can be used
> everywhere.
Ok.
Still, IMO this does not outweigh the benefit of a standard naming scheme.
If I may repeat myself (the question at the end is real, not rhetorical):
> Beside that, it still leaves the issue that the only existing "standard"
> for find_package() is the names of the variables:
>
> find_package(Foo)
>
> include_libraries(${Foo_INCLUDE_DIRS})
> ...
> target_link_libraries(hello ${Foo_LIBRARIES})
>
> Following that would be a benefit for cmake users.
>
> What do you suggest as standard naming for the imported targets ?
> Maybe Foo::Library ?
>
> Still, then we would have two competing standards, that's not better than 1
> standard.
Alex
More information about the cmake-developers
mailing list