On 05/20/2013 06:13 AM, Alexander Neundorf wrote: > On Saturday 18 May 2013, Stephen Kelly wrote: >> 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:: ...)
What's so bad about the exported targets being called "boost_..." instead of "boost::..."? VTK and ITK have worked that way for years. It is simpler if the name inside the upstream build matches that in the downstream consumers. We had some recent discussion about encouraging the convention of "namespace::" for imported targets, but perhaps we should reconsider the value and cost. > I don't think this is needed, IMO it just adds unneeded complexity. Yes, currently it feels like a solution looking for a problem. -Brad -- 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