INTERFACE_SOURCES.rst 1007 B

12345678910111213141516171819202122
  1. INTERFACE_SOURCES
  2. -----------------
  3. List of interface sources to compile into consuming targets.
  4. Targets may populate this property to publish the sources
  5. for consuming targets to compile. The :command:`target_sources` command
  6. populates this property with values given to the ``PUBLIC`` and
  7. ``INTERFACE`` keywords. Projects may also get and set the property directly.
  8. When target dependencies are specified using :command:`target_link_libraries`,
  9. CMake will read this property from all target dependencies to determine the
  10. sources of the consumer.
  11. Targets with ``INTERFACE_SOURCES`` may not be exported with the
  12. :command:`export` or :command:`install(EXPORT)` commands. This limitation may be
  13. lifted in a future version of CMake.
  14. Contents of ``INTERFACE_SOURCES`` may use "generator expressions"
  15. with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
  16. manual for available expressions. See the :manual:`cmake-buildsystem(7)`
  17. manual for more on defining buildsystem properties.