On 01/18/2017 03:14 PM, Ben Boeckel wrote:
> Installing the target can install the objects.
[snip]
On 01/18/2017 02:47 PM, Chris Bieneman wrote:
> If this allowed TARGET_OBJECTS to be used in the install(FILES ...)
> command, then we could create an object library and a custom install
> rule for the objects, which would be a lot cleaner.

In CMake `master` we now support `$<TARGET_OBJECTS:...>` in
`install(FILES)` and also support installing object libraries
directly via `install(TARGETS)` with an `OBJECTS DESTINATION`.

This will be in CMake 3.9.  Please try it out.

One problem for your use case is that the object file names
are still controlled by the generator.  You may need a custom
step with `install(SCRIPT)` or `install(CODE)` to fix the names
after installation.

-Brad
-- 

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

Reply via email to