# Custom command OUTPUTS not added to OBJECT Library's TARGET\_OBJECTS

**URL:** https://discourse.cmake.org/t/custom-command-outputs-not-added-to-object-librarys-target-objects/2946
**Category:** Usage
**Created:** [March 12, 2021, 9:36am UTC](https://discourse.cmake.org/t/custom-command-outputs-not-added-to-object-librarys-target-objects/2946 "2021-03-12T09:36:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [March 12, 2021, 4:25pm UTC](https://discourse.cmake.org/t/custom-command-outputs-not-added-to-object-librarys-target-objects/2946/2 "2021-03-12T16:25:55Z")

</div>

`TARGET_OBJECTS` is just the list of objects that CMake handles the builds for itself. Support for adding custom objects into that genex results would be a [new feature request](https://gitlab.kitware.com/cmake/cmake/-/issues) (and would probably require a policy).

However, there are usually better ways of doing this (from a cross-platform point of view at least). VTK has [`vtkEncodeString`](https://gitlab.kitware.com/vtk/vtk/-/blob/master/CMake/vtkEncodeString.cmake) to do this. If you’re using Qt, embedding via `.qrc` file would also be more cross-platform. This usecase has also [been discussed here](https://discourse.cmake.org/t/support-for-embedding-data-in-a-manner-equivalent-to-xxd/2121) before.

---

_[View the full topic](https://discourse.cmake.org/t/custom-command-outputs-not-added-to-object-librarys-target-objects/2946)._
