mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
Tutorial: Fix example FILE_SET names
FILE_SET names begin with lowercase letters, the examples use uppercase Fixes #27282
This commit is contained in:
@@ -337,7 +337,7 @@ To describe a collection of header files, we're going to use what's known as a
|
|||||||
library_implementation.cxx
|
library_implementation.cxx
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
FILE_SET MyHeaders
|
FILE_SET myHeaders
|
||||||
TYPE HEADERS
|
TYPE HEADERS
|
||||||
BASE_DIRS
|
BASE_DIRS
|
||||||
include
|
include
|
||||||
@@ -525,19 +525,19 @@ Consider the following concrete example:
|
|||||||
|
|
||||||
target_sources(MyLibrary
|
target_sources(MyLibrary
|
||||||
PRIVATE
|
PRIVATE
|
||||||
FILE_SET InternalOnlyHeaders
|
FILE_SET internalOnlyHeaders
|
||||||
TYPE HEADERS
|
TYPE HEADERS
|
||||||
FILES
|
FILES
|
||||||
InternalOnlyHeader.h
|
InternalOnlyHeader.h
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FILE_SET ConsumerOnlyHeaders
|
FILE_SET consumerOnlyHeaders
|
||||||
TYPE HEADERS
|
TYPE HEADERS
|
||||||
FILES
|
FILES
|
||||||
ConsumerOnlyHeader.h
|
ConsumerOnlyHeader.h
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
FILE_SET PublicHeaders
|
FILE_SET publicHeaders
|
||||||
TYPE HEADERS
|
TYPE HEADERS
|
||||||
FILES
|
FILES
|
||||||
PublicHeader.h
|
PublicHeader.h
|
||||||
@@ -554,9 +554,9 @@ Two specific properties which will be modified here are :prop_tgt:`HEADER_SETS`
|
|||||||
and :prop_tgt:`INTERFACE_HEADER_SETS`, which both contain lists of header file
|
and :prop_tgt:`INTERFACE_HEADER_SETS`, which both contain lists of header file
|
||||||
sets added via :command:`target_sources`.
|
sets added via :command:`target_sources`.
|
||||||
|
|
||||||
The value ``InternalOnlyHeaders`` will be added to :prop_tgt:`HEADER_SETS`,
|
The value ``internalOnlyHeaders`` will be added to :prop_tgt:`HEADER_SETS`,
|
||||||
``ConsumerOnlyHeaders`` to :prop_tgt:`INTERFACE_HEADER_SETS`, and
|
``consumerOnlyHeaders`` to :prop_tgt:`INTERFACE_HEADER_SETS`, and
|
||||||
``PublicHeaders`` will be added to both.
|
``publicHeaders`` will be added to both.
|
||||||
|
|
||||||
When a given target is being built, it will use its own *non-interface*
|
When a given target is being built, it will use its own *non-interface*
|
||||||
properties (eg, :prop_tgt:`HEADER_SETS`), combined with the *interface*
|
properties (eg, :prop_tgt:`HEADER_SETS`), combined with the *interface*
|
||||||
|
@@ -101,13 +101,13 @@ and consists of a single call to :command:`install(targets)`.
|
|||||||
TARGETS MyApp MyLib
|
TARGETS MyApp MyLib
|
||||||
|
|
||||||
FILE_SET HEADERS
|
FILE_SET HEADERS
|
||||||
FILE_SET AnotherHeaderFileSet
|
FILE_SET anotherHeaderFileSet
|
||||||
)
|
)
|
||||||
|
|
||||||
Most artifact kinds are installed by default and do not need to be listed in
|
Most artifact kinds are installed by default and do not need to be listed in
|
||||||
the :command:`install` command. However, ``FILE_SET``\ s must be named to let
|
the :command:`install` command. However, ``FILE_SET``\ s must be named to let
|
||||||
CMake know you want to install. In the above example we install two file
|
CMake know you want to install. In the above example we install two file
|
||||||
sets, one named ``HEADERS`` and another named ``AnotherHeaderFileSet``.
|
sets, one named ``HEADERS`` and another named ``anotherHeaderFileSet``.
|
||||||
|
|
||||||
When named, an artifact kind can be given various options, such as a destination.
|
When named, an artifact kind can be given various options, such as a destination.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user