On Saturday 18 May 2013, Stephen Kelly wrote:
> Hi,
> 
> I've pushed the EXPORT_NAME-genex topic to my clone. It allows
> uniform/generic renaming of targets on export. That means that while
> buildsystem targets might be named boost_any/boost_mpl, they can be
> exported as boost::any/boost::mpl like this:
> 
>  set(CMAKE_EXPORT_NAME $<REPLACE:$<TARGET_PROPERTY:NAME>,^boost_,>)
> 
>  add_library(boost_any ...)
>  add_library(boost_mpl ...)
> 
>  install(TARGETS boost_any boost_mpl EXPORT boostTargets ...)
>  install(EXPORT boostTargets NAMESPACE boost:: ...)
> 
> 
> I'd find
> 
>  add_library(boost_any ...)
>  set_property(TARGET boost_any PROPERTY EXPORT_NAME any)
> 
> for each target cumbersome and we'd end up with a macro wrapping
> add_library, which I'm trying to avoid and discourage.
> 
> KDE might use
> 
>  set(CMAKE_EXPORT_NAME $<REPLACE:$<TARGET_PROPERTY:NAME>,^K,>)
> 
>  add_library(KArchive ...)
>  add_library(KCoreAddons ...)
>  install(EXPORT kdeTargets NAMESPACE KF5:: ...)
> 
> to end up with KF5::Archive, KF5::CoreAddons etc. This is more similar to
> Qt5::Core, which does not duplicate the 'Q'.
> 
> Comments? Good idea/bad idea?

You won't be surprised ;-)

I don't think this is needed, IMO it just adds unneeded complexity.

The Config.cmake files can simply provide variables, issue solved.

Alex
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to