FILE_SET: install and export SOURCES file set type

This commit is contained in:
Marc Chevrier
2026-03-12 10:29:48 +01:00
parent 5c5b68f44e
commit c386aaebf8
21 changed files with 388 additions and 11 deletions

View File

@@ -245,7 +245,10 @@ Signatures
File sets are defined by the :command:`target_sources(FILE_SET)` command.
If the file set ``<set-name>`` exists and is ``PUBLIC`` or ``INTERFACE``,
any files in the set are installed under the destination (see below).
any files in the set of type ``HEADERS`` are installed under
the destination (see below). Other types do not have any default
destination, so ``DESTINATION`` option must be specified for each
``FILE_SET``.
The directory structure relative to the file set's base directories is
preserved. For example, a file added to the file set as
``/blah/include/myproj/here.h`` with a base directory ``/blah/include``
@@ -265,12 +268,13 @@ Signatures
``DESTINATION`` is omitted, a default destination will be taken from the
appropriate variable from :module:`GNUInstallDirs`, or set to a built-in
default value if that variable is not defined. The same is true for file
sets, and the public and private headers associated with the installed
targets through the :prop_tgt:`PUBLIC_HEADER` and :prop_tgt:`PRIVATE_HEADER`
target properties. A destination must always be provided for module libraries,
Apple bundles and frameworks. A destination can be omitted for interface and
object libraries, but they are handled differently (see the discussion of this
topic toward the end of this section).
sets of type ``HEADERS``, and the public and private headers associated with
the installed targets through the :prop_tgt:`PUBLIC_HEADER` and
:prop_tgt:`PRIVATE_HEADER` target properties. A destination must always be
provided for module libraries, Apple bundles and frameworks. A destination
can be omitted for interface and object libraries, but they are handled
differently (see the discussion of this topic toward the end of this
section).
For shared libraries on DLL platforms, if neither ``RUNTIME`` nor ``ARCHIVE``
destinations are specified, both the ``RUNTIME`` and ``ARCHIVE`` components are