Thank you, I was not aware of the EXPORT_NAME target property. Tamas On Tue, Sep 15, 2015 at 7:36 PM, Stephen Kelly <steve...@gmail.com> wrote:
> Tamás Kenéz wrote: > > >> For example, if an ALIAS can be IMPORTED, does it makes sense that it > can > > be > >> exported with export() and install(EXPORT)? > > > > Yes: couple of months ago I was adding install(EXPORT) to an existing > > CMakeList. The name of the library target which I had to export was not > > correct as export target name but I was not able change the library > target > > name because of backward compatibility. Being able to export an alias > > would have helped. > > I still think exporting should be a follow up to allowing IMPORTED ALIAS. > Just too keep the branch and discussion as short as possible. > > Nevertheless, I think you wouldn't need ALIAS targets for your use-case. > They are more than you need. You don't need the aliases anywhere except for > exporting. So, we could design something which allows you to export > aliases, > but be completely separate from ALIAS targets. > > For example, > > add_library(foo ${foo_SRCS}) > set_target_property(foo EXPORT_NAMES foo foo_old_name) > > ... > > install(EXPORT ...) > > resulting in a generated file containing > > add_library(foo IMPORTED) > ... > > add_library(foo_old_name IMPORTED) > ... > > where each of the generated targets get the same target properties. > > Note that there is already an EXPORT_NAME target property > > http://www.cmake.org/cmake/help/v3.3/prop_tgt/EXPORT_NAME.html > > but it is not a list, so the task would probably be to deprecate that one > and add EXPORT_NAMES. > > I filed > > http://public.kitware.com/Bug/view.php?id=15745 > > Thanks, > > Steve. > > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake-developers >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers