On Wed, Jan 18, 2017 at 11:47:42 -0800, Chris Bieneman wrote: > On Jan 18, 2017, at 5:58 AM, Ben Boeckel <ben.boec...@kitware.com> wrote: > > Plus our plan for installing OBJECT libraries was to install them as > > INTERFACE libraries, leaving the objects themselves behind. The idea is > > to allow object libraries into target_link_libraries() for usage > > requirements and to support exporting them as part of the build system > > (an explicit $<TARGET_OBJECTS> would still be required to use their > > objects due to issues with transitive linking causing duplicate symbols > > if target_sources were used). > > Ah... that wouldn't work for us because we actually need the objects > to be installed in the final product.
So I talked with Rob about this a bit and the INTERFACE bit is actually the *exporting* of the target. Installing the target can install the objects. I think the way this could work is that if it is installed, the objects go and if they are exported, they are exported as an INTERFACE library which supports a $<TARGET_OBJECTS> genex (and if the target is not installed, it wouldn't work). There will need to be some thought on it since there isn't a "just export the target" mechanism yet. Off the top of my head, I'd like to see install() have a INSTALL_OBJECTS keyword to cause OBJECT libraries to put their objects anywhere (since I suspect it will be an uncommon use case versus the need for a way to export the targets to an install tree). --Ben -- 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