qr 6.5.1: still missed with cmake version, trying 3.18.3

This commit is contained in:
kleuter
2023-10-31 23:36:59 +01:00
parent c386aac06f
commit 72a8e4201b
2808 changed files with 8828 additions and 3966 deletions

View File

@ -0,0 +1,23 @@
ADDITIONAL_CLEAN_FILES
----------------------
A :ref:`;-list <CMake Language Lists>` of files or directories that will be
removed as a part of the global ``clean`` target. It can be used to specify
files and directories that are generated as part of building the target or
that are directly associated with the target in some way (e.g. created as a
result of running the target).
For custom targets, if such files can be captured as outputs or byproducts
instead, then that should be preferred over adding them to this property.
If an additional clean file is used by multiple targets or isn't
target-specific, then the :prop_dir:`ADDITIONAL_CLEAN_FILES` directory
property may be the more appropriate property to use.
Relative paths are allowed and are interpreted relative to the
current binary directory.
Contents of ``ADDITIONAL_CLEAN_FILES`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.
This property only works for the :generator:`Ninja` and the Makefile
generators. It is ignored by other generators.

View File

@ -0,0 +1,12 @@
AIX_EXPORT_ALL_SYMBOLS
----------------------
On AIX, CMake automatically exports all symbols from shared libraries, and
from executables with the :prop_tgt:`ENABLE_EXPORTS` target property set.
Explicitly disable this boolean property to suppress the behavior and
export no symbols by default. In this case it is expected that the project
will use other means to export some symbols.
This property is initialized by the value of
the :variable:`CMAKE_AIX_EXPORT_ALL_SYMBOLS` variable if it is set
when a target is created.

View File

@ -0,0 +1,7 @@
ALIASED_TARGET
--------------
Name of target aliased by this target.
If this is an :ref:`Alias Target <Alias Targets>`, this property contains
the name of the target aliased.

View File

@ -0,0 +1,17 @@
ALIAS_GLOBAL
------------
Read-only property indicating of whether an :ref:`ALIAS target <Alias Targets>`
is globally visible.
The boolean value of this property is ``TRUE`` for aliases to
:ref:`IMPORTED targets <Imported Targets>` created
with the ``GLOBAL`` options to :command:`add_executable()` or
:command:`add_library()`, ``FALSE`` otherwise. It is undefined for
targets built within the project.
.. note::
Promoting an :ref:`IMPORTED target <Imported Targets>` from ``LOCAL``
to ``GLOBAL`` scope by changing the value or :prop_tgt:`IMPORTED_GLOBAL`
target property do not change the scope of local aliases.

View File

@ -0,0 +1,8 @@
ANDROID_ANT_ADDITIONAL_OPTIONS
------------------------------
Set the additional options for Android Ant build system. This is
a string value containing all command line options for the Ant build.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS` variable if it is
set when a target is created.

View File

@ -0,0 +1,8 @@
ANDROID_API
-----------
When :ref:`Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
Edition`, this property sets the Android target API version (e.g. ``15``).
The version number must be a positive decimal integer. This property is
initialized by the value of the :variable:`CMAKE_ANDROID_API` variable if
it is set when a target is created.

View File

@ -0,0 +1,7 @@
ANDROID_API_MIN
---------------
Set the Android MIN API version (e.g. ``9``). The version number
must be a positive decimal integer. This property is initialized by
the value of the :variable:`CMAKE_ANDROID_API_MIN` variable if it is set
when a target is created. Native code builds using this API version.

View File

@ -0,0 +1,18 @@
ANDROID_ARCH
------------
When :ref:`Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
Edition`, this property sets the Android target architecture.
This is a string property that could be set to the one of
the following values:
* ``armv7-a``: "ARMv7-A (armv7-a)"
* ``armv7-a-hard``: "ARMv7-A, hard-float ABI (armv7-a)"
* ``arm64-v8a``: "ARMv8-A, 64bit (arm64-v8a)"
* ``x86``: "x86 (x86)"
* ``x86_64``: "x86_64 (x86_64)"
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_ARCH` variable if it is set
when a target is created.

View File

@ -0,0 +1,9 @@
ANDROID_ASSETS_DIRECTORIES
--------------------------
Set the Android assets directories to copy into the main assets
folder before build. This a string property that contains the
directory paths separated by semicolon.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_ASSETS_DIRECTORIES` variable if it is set when
a target is created.

View File

@ -0,0 +1,15 @@
ANDROID_GUI
-----------
When :ref:`Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
Edition`, this property specifies whether to build an executable as an
application package on Android.
When this property is set to true the executable when built for Android
will be created as an application package. This property is initialized
by the value of the :variable:`CMAKE_ANDROID_GUI` variable if it is set
when a target is created.
Add the ``AndroidManifest.xml`` source file explicitly to the
target :command:`add_executable` command invocation to specify the
root directory of the application package source.

View File

@ -0,0 +1,7 @@
ANDROID_JAR_DEPENDENCIES
------------------------
Set the Android property that specifies JAR dependencies.
This is a string value property. This property is initialized
by the value of the :variable:`CMAKE_ANDROID_JAR_DEPENDENCIES`
variable if it is set when a target is created.

View File

@ -0,0 +1,14 @@
ANDROID_JAR_DIRECTORIES
-----------------------
Set the Android property that specifies directories to search for
the JAR libraries.
This a string property that contains the directory paths separated by
semicolons. This property is initialized by the value of the
:variable:`CMAKE_ANDROID_JAR_DIRECTORIES` variable if it is set when
a target is created.
Contents of ``ANDROID_JAR_DIRECTORIES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions.

View File

@ -0,0 +1,8 @@
ANDROID_JAVA_SOURCE_DIR
-----------------------
Set the Android property that defines the Java source code root directories.
This a string property that contains the directory paths separated by semicolon.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_JAVA_SOURCE_DIR` variable if it is set
when a target is created.

View File

@ -0,0 +1,14 @@
ANDROID_NATIVE_LIB_DEPENDENCIES
-------------------------------
Set the Android property that specifies the .so dependencies.
This is a string property.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES` variable if it is set
when a target is created.
Contents of ``ANDROID_NATIVE_LIB_DEPENDENCIES`` may use
"generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for
available expressions.

View File

@ -0,0 +1,16 @@
ANDROID_NATIVE_LIB_DIRECTORIES
------------------------------
Set the Android property that specifies directories to search for the ``.so``
libraries.
This a string property that contains the directory paths separated
by semicolons.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES` variable if it is set when a
target is created.
Contents of ``ANDROID_NATIVE_LIB_DIRECTORIES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions.

View File

@ -0,0 +1,8 @@
ANDROID_PROCESS_MAX
-------------------
Set the Android property that defines the maximum number of a
parallel Android NDK compiler processes (e.g. ``4``).
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_PROCESS_MAX` variable if it is set
when a target is created.

View File

@ -0,0 +1,9 @@
ANDROID_PROGUARD
----------------
When this property is set to true that enables the ProGuard tool to shrink,
optimize, and obfuscate the code by removing unused code and renaming
classes, fields, and methods with semantically obscure names.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_PROGUARD` variable if it is set
when a target is created.

View File

@ -0,0 +1,9 @@
ANDROID_PROGUARD_CONFIG_PATH
----------------------------
Set the Android property that specifies the location of the ProGuard
config file. Leave empty to use the default one.
This a string property that contains the path to ProGuard config file.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_PROGUARD_CONFIG_PATH` variable if it is set
when a target is created.

View File

@ -0,0 +1,8 @@
ANDROID_SECURE_PROPS_PATH
-------------------------
Set the Android property that states the location of the secure properties file.
This is a string property that contains the file path.
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_SECURE_PROPS_PATH` variable
if it is set when a target is created.

View File

@ -0,0 +1,6 @@
ANDROID_SKIP_ANT_STEP
---------------------
Set the Android property that defines whether or not to skip the Ant build step.
This is a boolean property initialized by the value of the
:variable:`CMAKE_ANDROID_SKIP_ANT_STEP` variable if it is set when a target is created.

View File

@ -0,0 +1,27 @@
ANDROID_STL_TYPE
----------------
When :ref:`Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
Edition`, this property specifies the type of STL support for the project.
This is a string property that could set to the one of the following values:
``none``
No C++ Support
``system``
Minimal C++ without STL
``gabi++_static``
GAbi++ Static
``gabi++_shared``
GAbi++ Shared
``gnustl_static``
GNU libstdc++ Static
``gnustl_shared``
GNU libstdc++ Shared
``stlport_static``
STLport Static
``stlport_shared``
STLport Shared
This property is initialized by the value of the
:variable:`CMAKE_ANDROID_STL_TYPE` variable if it is set when a target is
created.

View File

@ -0,0 +1,9 @@
ARCHIVE_OUTPUT_DIRECTORY
------------------------
.. |XXX| replace:: :ref:`ARCHIVE <Archive Output Artifacts>`
.. |xxx| replace:: archive
.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: CMAKE_ARCHIVE_OUTPUT_DIRECTORY
.. include:: XXX_OUTPUT_DIRECTORY.txt
See also the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>` target property.

View File

@ -0,0 +1,16 @@
ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
---------------------------------
Per-configuration output directory for
:ref:`ARCHIVE <Archive Output Artifacts>` target files.
This is a per-configuration version of the
:prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY` target property, but
multi-configuration generators (VS, Xcode) do NOT append a
per-configuration subdirectory to the specified directory. This
property is initialized by the value of the
:variable:`CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>` variable if
it is set when a target is created.
Contents of ``ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.

View File

@ -0,0 +1,8 @@
ARCHIVE_OUTPUT_NAME
-------------------
.. |XXX| replace:: :ref:`ARCHIVE <Archive Output Artifacts>`
.. |xxx| replace:: archive
.. include:: XXX_OUTPUT_NAME.txt
See also the :prop_tgt:`ARCHIVE_OUTPUT_NAME_<CONFIG>` target property.

View File

@ -0,0 +1,8 @@
ARCHIVE_OUTPUT_NAME_<CONFIG>
----------------------------
Per-configuration output name for
:ref:`ARCHIVE <Archive Output Artifacts>` target files.
This is the configuration-specific version of the
:prop_tgt:`ARCHIVE_OUTPUT_NAME` target property.

View File

@ -0,0 +1,17 @@
AUTOGEN_BUILD_DIR
-----------------
Directory where :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC`
generate files for the target.
The directory is created on demand and automatically added to the
:prop_tgt:`ADDITIONAL_CLEAN_FILES` target property.
When unset or empty the directory ``<dir>/<target-name>_autogen`` is used where
``<dir>`` is :variable:`CMAKE_CURRENT_BINARY_DIR` and ``<target-name>``
is :prop_tgt:`NAME`.
By default :prop_tgt:`AUTOGEN_BUILD_DIR` is unset.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,38 @@
AUTOGEN_ORIGIN_DEPENDS
----------------------
Switch for forwarding origin target dependencies to the corresponding
``_autogen`` target.
Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property
``ON`` have a corresponding ``_autogen`` target which generates
``moc`` and ``uic`` files. As this ``_autogen`` target is created at
generate-time, it is not possible to define dependencies of it using
e.g. :command:`add_dependencies`. Instead the
:prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` target property decides whether the origin
target dependencies should be forwarded to the ``_autogen`` target or not.
By default :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is initialized from
:variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` which is ``ON`` by default.
In total the dependencies of the ``_autogen`` target are composed from
- forwarded origin target dependencies
(enabled by default via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`)
- additional user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS`
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Note
^^^^
Disabling :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is useful to avoid building of
origin target dependencies when building the ``_autogen`` target only.
This is especially interesting when a
:variable:`global autogen target <CMAKE_GLOBAL_AUTOGEN_TARGET>` is enabled.
When the ``_autogen`` target doesn't require all the origin target's
dependencies, and :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is disabled, it might be
necessary to extend :prop_tgt:`AUTOGEN_TARGET_DEPENDS` to add missing
dependencies.

View File

@ -0,0 +1,21 @@
AUTOGEN_PARALLEL
----------------
Number of parallel ``moc`` or ``uic`` processes to start when using
:prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
The custom ``<origin>_autogen`` target starts a number of threads of which
each one parses a source file and on demand starts a ``moc`` or ``uic``
process. ``AUTOGEN_PARALLEL`` controls how many parallel threads
(and therefore ``moc`` or ``uic`` processes) are started.
- An empty (or unset) value or the string ``AUTO`` sets the number of
threads/processes to the number of physical CPUs on the host system.
- A positive non zero integer value sets the exact thread/process count.
- Otherwise a single thread/process is started.
By default ``AUTOGEN_PARALLEL`` is initialized from
:variable:`CMAKE_AUTOGEN_PARALLEL`.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,36 @@
AUTOGEN_TARGET_DEPENDS
----------------------
Additional target dependencies of the corresponding ``_autogen`` target.
Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property
``ON`` have a corresponding ``_autogen`` target which generates
``moc`` and ``uic`` files. As this ``_autogen`` target is created at
generate-time, it is not possible to define dependencies of it using
e.g. :command:`add_dependencies`. Instead the
:prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property can be set to a
:ref:`;-list <CMake Language Lists>` of additional dependencies for the
``_autogen`` target. Dependencies can be target names or file names.
In total the dependencies of the ``_autogen`` target are composed from
- forwarded origin target dependencies
(enabled by default via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`)
- additional user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS`
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Use cases
^^^^^^^^^
If :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` depends on a file that is either
- a :prop_sf:`GENERATED` non C++ file (e.g. a :prop_sf:`GENERATED` ``.json``
or ``.ui`` file) or
- a :prop_sf:`GENERATED` C++ file that isn't recognized by :prop_tgt:`AUTOMOC`
and :prop_tgt:`AUTOUIC` because it's skipped by :prop_sf:`SKIP_AUTOMOC`,
:prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN` or :policy:`CMP0071` or
- a file that isn't in the origin target's sources
it must be added to :prop_tgt:`AUTOGEN_TARGET_DEPENDS`.

View File

@ -0,0 +1,247 @@
AUTOMOC
-------
Should the target be processed with auto-moc (for Qt projects).
:prop_tgt:`AUTOMOC` is a boolean specifying whether CMake will handle the Qt
``moc`` preprocessor automatically, i.e. without having to use the
:module:`QT4_WRAP_CPP() <FindQt4>` or ``QT5_WRAP_CPP()`` macro.
Currently Qt4 and Qt5 are supported.
This property is initialized by the value of the :variable:`CMAKE_AUTOMOC`
variable if it is set when a target is created.
When this property is set ``ON``, CMake will scan the header and
source files at build time and invoke ``moc`` accordingly.
Header file processing
^^^^^^^^^^^^^^^^^^^^^^
At configuration time, a list of header files that should be scanned by
:prop_tgt:`AUTOMOC` is computed from the target's sources.
- All header files in the target's sources are added to the scan list.
- For all C++ source files ``<source_base>.<source_extension>`` in the
target's sources, CMake searches for
- a regular header with the same base name
(``<source_base>.<header_extention>``) and
- a private header with the same base name and a ``_p`` suffix
(``<source_base>_p.<header_extention>``)
and adds these to the scan list.
At build time, CMake scans each unknown or modified header file from the
list and searches for
- a Qt macro from :prop_tgt:`AUTOMOC_MACRO_NAMES`,
- additional file dependencies from the ``FILE`` argument of a
``Q_PLUGIN_METADATA`` macro and
- additional file dependencies detected by filters defined in
:prop_tgt:`AUTOMOC_DEPEND_FILTERS`.
If a Qt macro is found, then the header will be compiled by the ``moc`` to the
output file ``moc_<base_name>.cpp``. The complete output file path is
described in the section `Output file location`_.
The header will be ``moc`` compiled again if a file from the additional file
dependencies changes.
Header ``moc`` output files ``moc_<base_name>.cpp`` can be included in source
files. In the section `Including header moc files in sources`_ there is more
information on that topic.
Source file processing
^^^^^^^^^^^^^^^^^^^^^^
At build time, CMake scans each unknown or modified C++ source file from the
target's sources for
- a Qt macro from :prop_tgt:`AUTOMOC_MACRO_NAMES`,
- includes of header ``moc`` files
(see `Including header moc files in sources`_),
- additional file dependencies from the ``FILE`` argument of a
``Q_PLUGIN_METADATA`` macro and
- additional file dependencies detected by filters defined in
:prop_tgt:`AUTOMOC_DEPEND_FILTERS`.
If a Qt macro is found, then the C++ source file
``<base>.<source_extension>`` is expected to as well contain an include
statement
.. code-block:: c++
#include <<base>.moc> // or
#include "<base>.moc"
The source file then will be compiled by the ``moc`` to the output file
``<base>.moc``. A description of the complete output file path is in section
`Output file location`_.
The source will be ``moc`` compiled again if a file from the additional file
dependencies changes.
Including header moc files in sources
"""""""""""""""""""""""""""""""""""""
A source file can include the ``moc`` output file of a header
``<header_base>.<header_extension>`` by using an include statement of
the form
.. code-block:: c++
#include <moc_<header_base>.cpp> // or
#include "moc_<header_base>.cpp"
If the ``moc`` output file of a header is included by a source, it will
be generated in a different location than if it was not included. This is
described in the section `Output file location`_.
Output file location
^^^^^^^^^^^^^^^^^^^^
Included moc output files
"""""""""""""""""""""""""
``moc`` output files that are included by a source file will be generated in
- ``<AUTOGEN_BUILD_DIR>/include``
for single configuration generators or in
- ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``
for :prop_gbl:`multi configuration <GENERATOR_IS_MULTI_CONFIG>` generators.
Where ``<AUTOGEN_BUILD_DIR>`` is the value of the target property
:prop_tgt:`AUTOGEN_BUILD_DIR`.
The include directory is automatically added to the target's
:prop_tgt:`INCLUDE_DIRECTORIES`.
Not included moc output files
"""""""""""""""""""""""""""""
``moc`` output files that are not included in a source file will be generated
in
- ``<AUTOGEN_BUILD_DIR>/<SOURCE_DIR_CHECKSUM>``
for single configuration generators or in,
- ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>/<SOURCE_DIR_CHECKSUM>``
for :prop_gbl:`multi configuration <GENERATOR_IS_MULTI_CONFIG>` generators.
Where ``<SOURCE_DIR_CHECKSUM>`` is a checksum computed from the relative
parent directory path of the ``moc`` input file. This scheme allows to have
``moc`` input files with the same name in different directories.
All not included ``moc`` output files will be included automatically by the
CMake generated file
- ``<AUTOGEN_BUILD_DIR>/mocs_compilation.cpp``,
which is added to the target's sources.
Qt version detection
^^^^^^^^^^^^^^^^^^^^
:prop_tgt:`AUTOMOC` enabled targets need to know the Qt major and minor
version they're working with. The major version usually is provided by the
``INTERFACE_QT_MAJOR_VERSION`` property of the ``Qt[45]Core`` library,
that the target links to. To find the minor version, CMake builds a list of
available Qt versions from
- ``Qt5Core_VERSION_MAJOR`` and ``Qt5Core_VERSION_MINOR`` variables
(usually set by ``find_package(Qt5...)``)
- ``Qt5Core_VERSION_MAJOR`` and ``Qt5Core_VERSION_MINOR`` directory properties
- ``QT_VERSION_MAJOR`` and ``QT_VERSION_MINOR`` variables
(usually set by ``find_package(Qt4...)``)
- ``QT_VERSION_MAJOR`` and ``QT_VERSION_MINOR`` directory properties
in the context of the :command:`add_executable` or :command:`add_library` call.
Assumed ``INTERFACE_QT_MAJOR_VERSION`` is a valid number, the first
entry in the list with a matching major version is taken. If no matching major
version was found, an error is generated.
If ``INTERFACE_QT_MAJOR_VERSION`` is not a valid number, the first
entry in the list is taken.
A ``find_package(Qt[45]...)`` call sets the ``QT/Qt5Core_VERSION_MAJOR/MINOR``
variables. If the call is in a different context than the
:command:`add_executable` or :command:`add_library` call, e.g. in a function,
then the version variables might not be available to the :prop_tgt:`AUTOMOC`
enabled target.
In that case the version variables can be forwarded from the
``find_package(Qt[45]...)`` calling context to the :command:`add_executable`
or :command:`add_library` calling context as directory properties.
The following Qt5 example demonstrates the procedure.
.. code-block:: cmake
function (add_qt5_client)
find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets)
...
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}")
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MAJOR}")
...
endfunction ()
...
add_qt5_client()
add_executable(myTarget main.cpp)
target_link_libraries(myTarget Qt5::QtWidgets)
set_property(TARGET myTarget PROPERTY AUTOMOC ON)
Modifiers
^^^^^^^^^
:prop_tgt:`AUTOMOC_EXECUTABLE`:
The ``moc`` executable will be detected automatically, but can be forced to
a certain binary using this target property.
:prop_tgt:`AUTOMOC_MOC_OPTIONS`:
Additional command line options for ``moc`` can be set in this target property.
:prop_tgt:`AUTOMOC_MACRO_NAMES`:
This list of Qt macro names can be extended to search for additional macros in
headers and sources.
:prop_tgt:`AUTOMOC_DEPEND_FILTERS`:
``moc`` dependency file names can be extracted from headers or sources by
defining file name filters in this target property.
:prop_tgt:`AUTOMOC_COMPILER_PREDEFINES`:
Compiler pre definitions for ``moc`` are written to the ``moc_predefs.h`` file.
The generation of this file can be enabled or disabled in this target property.
:prop_sf:`SKIP_AUTOMOC`:
Sources and headers can be excluded from :prop_tgt:`AUTOMOC` processing by
setting this source file property.
:prop_sf:`SKIP_AUTOGEN`:
Source files can be excluded from :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` processing by
setting this source file property.
:prop_gbl:`AUTOGEN_SOURCE_GROUP`:
This global property can be used to group files generated by
:prop_tgt:`AUTOMOC` or :prop_tgt:`AUTORCC` together in an IDE, e.g. in MSVS.
:prop_gbl:`AUTOGEN_TARGETS_FOLDER`:
This global property can be used to group :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` targets together in an IDE,
e.g. in MSVS.
:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`:
A global ``autogen`` target, that depends on all :prop_tgt:`AUTOMOC` or
:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project,
will be generated when this variable is ``ON``.
:prop_tgt:`AUTOGEN_PARALLEL`:
This target property controls the number of ``moc`` or ``uic`` processes to
start in parallel during builds.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,24 @@
AUTOMOC_COMPILER_PREDEFINES
---------------------------
Boolean value used by :prop_tgt:`AUTOMOC` to determine if the
compiler pre definitions file ``moc_predefs.h`` should be generated.
CMake generates a ``moc_predefs.h`` file with compiler pre definitions
from the output of the command defined in
:variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>`
when
- :prop_tgt:`AUTOMOC` is enabled,
- :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is enabled,
- :variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>` isn't empty and
- the Qt version is greater or equal 5.8.
The ``moc_predefs.h`` file, which is generated in :prop_tgt:`AUTOGEN_BUILD_DIR`,
is passed to ``moc`` as the argument to the ``--include`` option.
By default :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is initialized from
:variable:`CMAKE_AUTOMOC_COMPILER_PREDEFINES`, which is ON by default.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,107 @@
AUTOMOC_DEPEND_FILTERS
----------------------
Filter definitions used by :prop_tgt:`AUTOMOC` to extract file names from a
source file that are registered as additional dependencies for the
``moc`` file of the source file.
Filters are defined as ``KEYWORD;REGULAR_EXPRESSION`` pairs. First the file
content is searched for ``KEYWORD``. If it is found at least once, then file
names are extracted by successively searching for ``REGULAR_EXPRESSION`` and
taking the first match group.
The file name found in the first match group is searched for
- first in the vicinity of the source file
- and afterwards in the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
If any of the extracted files changes, then the ``moc`` file for the source
file gets rebuilt even when the source file itself doesn't change.
If any of the extracted files is :prop_sf:`GENERATED` or if it is not in the
target's sources, then it might be necessary to add it to the
``_autogen`` target dependencies.
See :prop_tgt:`AUTOGEN_TARGET_DEPENDS` for reference.
By default :prop_tgt:`AUTOMOC_DEPEND_FILTERS` is initialized from
:variable:`CMAKE_AUTOMOC_DEPEND_FILTERS`, which is empty by default.
From Qt 5.15.0 on this variable is ignored as moc is able to output the correct
dependencies.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Example 1
^^^^^^^^^
A header file ``my_class.hpp`` uses a custom macro ``JSON_FILE_MACRO`` which
is defined in an other header ``macros.hpp``.
We want the ``moc`` file of ``my_class.hpp`` to depend on the file name
argument of ``JSON_FILE_MACRO``::
// my_class.hpp
class My_Class : public QObject
{
Q_OBJECT
JSON_FILE_MACRO ( "info.json" )
...
};
In ``CMakeLists.txt`` we add a filter to
:variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` like this::
list( APPEND CMAKE_AUTOMOC_DEPEND_FILTERS
"JSON_FILE_MACRO"
"[\n][ \t]*JSON_FILE_MACRO[ \t]*\\([ \t]*\"([^\"]+)\""
)
We assume ``info.json`` is a plain (not :prop_sf:`GENERATED`) file that is
listed in the target's source. Therefore we do not need to add it to
:prop_tgt:`AUTOGEN_TARGET_DEPENDS`.
Example 2
^^^^^^^^^
In the target ``my_target`` a header file ``complex_class.hpp`` uses a
custom macro ``JSON_BASED_CLASS`` which is defined in an other header
``macros.hpp``::
// macros.hpp
...
#define JSON_BASED_CLASS(name, json) \
class name : public QObject \
{ \
Q_OBJECT \
Q_PLUGIN_METADATA(IID "demo" FILE json) \
name() {} \
};
...
::
// complex_class.hpp
#pragma once
JSON_BASED_CLASS(Complex_Class, "meta.json")
// end of file
Since ``complex_class.hpp`` doesn't contain a ``Q_OBJECT`` macro it would be
ignored by :prop_tgt:`AUTOMOC`. We change this by adding ``JSON_BASED_CLASS``
to :variable:`CMAKE_AUTOMOC_MACRO_NAMES`::
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "JSON_BASED_CLASS")
We want the ``moc`` file of ``complex_class.hpp`` to depend on
``meta.json``. So we add a filter to
:variable:`CMAKE_AUTOMOC_DEPEND_FILTERS`::
list(APPEND CMAKE_AUTOMOC_DEPEND_FILTERS
"JSON_BASED_CLASS"
"[\n^][ \t]*JSON_BASED_CLASS[ \t]*\\([^,]*,[ \t]*\"([^\"]+)\""
)
Additionally we assume ``meta.json`` is :prop_sf:`GENERATED` which is
why we have to add it to :prop_tgt:`AUTOGEN_TARGET_DEPENDS`::
set_property(TARGET my_target APPEND PROPERTY AUTOGEN_TARGET_DEPENDS "meta.json")

View File

@ -0,0 +1,15 @@
AUTOMOC_EXECUTABLE
------------------
:prop_tgt:`AUTOMOC_EXECUTABLE` is file path pointing to the ``moc``
executable to use for :prop_tgt:`AUTOMOC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``moc`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``moc`` can not work -- e.g. because
you are building the ``moc`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,32 @@
AUTOMOC_MACRO_NAMES
-------------------
A :ref:`semicolon-separated list <CMake Language Lists>` list of macro names used by
:prop_tgt:`AUTOMOC` to determine if a C++ file needs to be processed by ``moc``.
This property is only used if the :prop_tgt:`AUTOMOC` property is ``ON``
for this target.
When running :prop_tgt:`AUTOMOC`, CMake searches for the strings listed in
:prop_tgt:`AUTOMOC_MACRO_NAMES` in C++ source and header files.
If any of the strings is found
- as the first non space string on a new line or
- as the first non space string after a ``{`` on a new line,
then the file will be processed by ``moc``.
By default :prop_tgt:`AUTOMOC_MACRO_NAMES` is initialized from
:variable:`CMAKE_AUTOMOC_MACRO_NAMES`.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Example
^^^^^^^
In this case the ``Q_OBJECT`` macro is hidden inside another macro
called ``CUSTOM_MACRO``. To let CMake know that source files that contain
``CUSTOM_MACRO`` need to be ``moc`` processed, we call::
set_property(TARGET tgt APPEND PROPERTY AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")

View File

@ -0,0 +1,17 @@
AUTOMOC_MOC_OPTIONS
-------------------
Additional options for ``moc`` when using :prop_tgt:`AUTOMOC`
This property is only used if the :prop_tgt:`AUTOMOC` property is ``ON``
for this target. In this case, it holds additional command line
options which will be used when ``moc`` is executed during the build, i.e.
it is equivalent to the optional ``OPTIONS`` argument of the
:module:`qt4_wrap_cpp() <FindQt4>` macro.
This property is initialized by the value of the
:variable:`CMAKE_AUTOMOC_MOC_OPTIONS` variable if it is set when a target
is created, or an empty string otherwise.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,31 @@
AUTOMOC_PATH_PREFIX
-------------------
When this property is ``ON``, CMake will generate the ``-p`` path prefix
option for ``moc`` on :prop_tgt:`AUTOMOC` enabled Qt targets.
To generate the path prefix, CMake tests if the header compiled by ``moc``
is in any of the target
:command:`include directories <target_include_directories>`. If so, CMake will
compute the relative path accordingly. If the header is not in the
:command:`include directories <target_include_directories>`, CMake will omit
the ``-p`` path prefix option. ``moc`` usually generates a
relative include path in that case.
:prop_tgt:`AUTOMOC_PATH_PREFIX` is initialized from the variable
:variable:`CMAKE_AUTOMOC_PATH_PREFIX`, which is ``OFF`` by default.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Reproducible builds
^^^^^^^^^^^^^^^^^^^
For reproducible builds it is recommended to keep headers that are ``moc``
compiled in one of the target
:command:`include directories <target_include_directories>` and set
:prop_tgt:`AUTOMOC_PATH_PREFIX` to ``ON``. This ensures that:
- ``moc`` output files are identical on different build setups,
- ``moc`` output files will compile correctly when the source and/or
build directory is a symbolic link.

View File

@ -0,0 +1,62 @@
AUTORCC
-------
Should the target be processed with auto-rcc (for Qt projects).
:prop_tgt:`AUTORCC` is a boolean specifying whether CMake will handle
the Qt ``rcc`` code generator automatically, i.e. without having to use
the :module:`QT4_ADD_RESOURCES() <FindQt4>` or ``QT5_ADD_RESOURCES()``
macro. Currently Qt4 and Qt5 are supported.
When this property is ``ON``, CMake will handle ``.qrc`` files added
as target sources at build time and invoke ``rcc`` accordingly.
This property is initialized by the value of the :variable:`CMAKE_AUTORCC`
variable if it is set when a target is created.
By default :prop_tgt:`AUTORCC` is processed by a
:command:`custom command <add_custom_command>`.
If the ``.qrc`` file is :prop_sf:`GENERATED`, a
:command:`custom target <add_custom_target>` is used instead.
When there are multiple ``.qrc`` files with the same name, CMake will
generate unspecified unique output file names for ``rcc``. Therefore, if
``Q_INIT_RESOURCE()`` or ``Q_CLEANUP_RESOURCE()`` need to be used, the
``.qrc`` file name must be unique.
Modifiers
^^^^^^^^^
:prop_tgt:`AUTORCC_EXECUTABLE`:
The ``rcc`` executable will be detected automatically, but can be forced to
a certain binary by setting this target property.
:prop_tgt:`AUTORCC_OPTIONS`:
Additional command line options for ``rcc`` can be set via this target
property. The corresponding :prop_sf:`AUTORCC_OPTIONS` source file property
can be used to specify options to be applied only to a specific ``.qrc`` file.
:prop_sf:`SKIP_AUTORCC`:
``.qrc`` files can be excluded from :prop_tgt:`AUTORCC` processing by
setting this source file property.
:prop_sf:`SKIP_AUTOGEN`:
Source files can be excluded from :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` processing by
setting this source file property.
:prop_gbl:`AUTOGEN_SOURCE_GROUP`:
This global property can be used to group files generated by
:prop_tgt:`AUTOMOC` or :prop_tgt:`AUTORCC` together in an IDE, e.g. in MSVS.
:prop_gbl:`AUTOGEN_TARGETS_FOLDER`:
This global property can be used to group :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` targets together in an IDE,
e.g. in MSVS.
:variable:`CMAKE_GLOBAL_AUTORCC_TARGET`:
A global ``autorcc`` target that depends on all :prop_tgt:`AUTORCC` targets
in the project will be generated when this variable is ``ON``.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,15 @@
AUTORCC_EXECUTABLE
------------------
:prop_tgt:`AUTORCC_EXECUTABLE` is file path pointing to the ``rcc``
executable to use for :prop_tgt:`AUTORCC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``rcc`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``rcc`` can not work -- e.g. because
you are building the ``rcc`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,28 @@
AUTORCC_OPTIONS
---------------
Additional options for ``rcc`` when using :prop_tgt:`AUTORCC`
This property holds additional command line options which will be used
when ``rcc`` is executed during the build via :prop_tgt:`AUTORCC`,
i.e. it is equivalent to the optional ``OPTIONS`` argument of the
:module:`qt4_add_resources() <FindQt4>` macro.
This property is initialized by the value of the
:variable:`CMAKE_AUTORCC_OPTIONS` variable if it is set when a target is
created, or an empty string otherwise.
The options set on the target may be overridden by :prop_sf:`AUTORCC_OPTIONS`
set on the ``.qrc`` source file.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
EXAMPLE
^^^^^^^
.. code-block:: cmake
# ...
set_property(TARGET tgt PROPERTY AUTORCC_OPTIONS "--compress;9")
# ...

View File

@ -0,0 +1,85 @@
AUTOUIC
-------
Should the target be processed with auto-uic (for Qt projects).
:prop_tgt:`AUTOUIC` is a boolean specifying whether CMake will handle
the Qt ``uic`` code generator automatically, i.e. without having to use
the :module:`QT4_WRAP_UI() <FindQt4>` or ``QT5_WRAP_UI()`` macro. Currently
Qt4 and Qt5 are supported.
This property is initialized by the value of the :variable:`CMAKE_AUTOUIC`
variable if it is set when a target is created.
When this property is ``ON``, CMake will scan the header and source files at
build time and invoke ``uic`` accordingly.
Header and source file processing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
At build time, CMake scans each header and source file from the
target's sources for include statements of the form
.. code-block:: c++
#include "ui_<ui_base>.h"
Once such an include statement is found in a file, CMake searches for the
``uic`` input file ``<ui_base>.ui``
- in the vicinity of the file and
- in the :prop_tgt:`AUTOUIC_SEARCH_PATHS` of the target.
If the ``<ui_base>.ui`` file was found, ``uic`` is called on it to generate
``ui_<ui_base>.h`` in the directory
- ``<AUTOGEN_BUILD_DIR>/include`` for single configuration generators or in
- ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>`` for
:prop_gbl:`multi configuration <GENERATOR_IS_MULTI_CONFIG>` generators.
Where ``<AUTOGEN_BUILD_DIR>`` is the value of the target property
:prop_tgt:`AUTOGEN_BUILD_DIR`.
The include directory is automatically added to the target's
:prop_tgt:`INCLUDE_DIRECTORIES`.
Modifiers
^^^^^^^^^
:prop_tgt:`AUTOUIC_EXECUTABLE`:
The ``uic`` executable will be detected automatically, but can be forced to
a certain binary using this target property.
:prop_tgt:`AUTOUIC_OPTIONS`:
Additional command line options for ``uic`` can be set via this target
property. The corresponding :prop_sf:`AUTOUIC_OPTIONS` source file property
can be used to specify options to be applied only to a specific
``<base_name>.ui`` file.
:prop_sf:`SKIP_AUTOUIC`:
Source files can be excluded from :prop_tgt:`AUTOUIC` processing by setting
this source file property.
:prop_sf:`SKIP_AUTOGEN`:
Source files can be excluded from :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` processing by
setting this source file property.
:prop_gbl:`AUTOGEN_TARGETS_FOLDER`:
This global property can be used to group :prop_tgt:`AUTOMOC`,
:prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC` targets together in an IDE,
e.g. in MSVS.
:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`:
A global ``autogen`` target, that depends on all :prop_tgt:`AUTOMOC` or
:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project,
will be generated when this variable is ``ON``.
:prop_tgt:`AUTOGEN_PARALLEL`:
This target property controls the number of ``moc`` or ``uic`` processes to
start in parallel during builds.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,15 @@
AUTOUIC_EXECUTABLE
------------------
:prop_tgt:`AUTOUIC_EXECUTABLE` is file path pointing to the ``uic``
executable to use for :prop_tgt:`AUTOUIC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``uic`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``uic`` can not work -- e.g. because
you are building the ``uic`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,32 @@
AUTOUIC_OPTIONS
---------------
Additional options for ``uic`` when using :prop_tgt:`AUTOUIC`
This property holds additional command line options which will be used when
``uic`` is executed during the build via :prop_tgt:`AUTOUIC`, i.e. it is
equivalent to the optional ``OPTIONS`` argument of the
:module:`qt4_wrap_ui() <FindQt4>` macro.
This property is initialized by the value of the
:variable:`CMAKE_AUTOUIC_OPTIONS` variable if it is set when a target is
created, or an empty string otherwise.
The options set on the target may be overridden by :prop_sf:`AUTOUIC_OPTIONS`
set on the ``.ui`` source file.
This property may use "generator expressions" with the syntax ``$<...>``.
See the :manual:`cmake-generator-expressions(7)` manual for available
expressions.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
EXAMPLE
^^^^^^^
.. code-block:: cmake
# ...
set_property(TARGET tgt PROPERTY AUTOUIC_OPTIONS "--no-protection")
# ...

View File

@ -0,0 +1,12 @@
AUTOUIC_SEARCH_PATHS
--------------------
Search path list used by :prop_tgt:`AUTOUIC` to find included
``.ui`` files.
This property is initialized by the value of the
:variable:`CMAKE_AUTOUIC_SEARCH_PATHS` variable if it is set
when a target is created. Otherwise it is empty.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.

View File

@ -0,0 +1,6 @@
BINARY_DIR
----------
This read-only property reports the value of the
:variable:`CMAKE_CURRENT_BINARY_DIR` variable in the directory in which
the target was defined.

View File

@ -0,0 +1,13 @@
BUILD_RPATH
-----------
A :ref:`semicolon-separated list <CMake Language Lists>` specifying runtime path (``RPATH``)
entries to add to binaries linked in the build tree (for platforms that
support it). The entries will *not* be used for binaries in the install
tree. See also the :prop_tgt:`INSTALL_RPATH` target property.
This property is initialized by the value of the variable
:variable:`CMAKE_BUILD_RPATH` if it is set when a target is created.
This property supports
:manual:`generator expressions <cmake-generator-expressions(7)>`.

View File

@ -0,0 +1,24 @@
BUILD_RPATH_USE_ORIGIN
----------------------
Whether to use relative paths for the build ``RPATH``.
This property is initialized by the value of the variable
:variable:`CMAKE_BUILD_RPATH_USE_ORIGIN`.
On platforms that support runtime paths (``RPATH``) with the
``$ORIGIN`` token, setting this property to ``TRUE`` enables relative
paths in the build ``RPATH`` for executables and shared libraries that
point to shared libraries in the same build tree.
Normally the build ``RPATH`` of a binary contains absolute paths
to the directory of each shared library it links to. The ``RPATH``
entries for directories contained within the build tree can be made
relative to enable relocatable builds and to help achieve reproducible
builds by omitting the build directory from the build environment.
This property has no effect on platforms that do not support the
``$ORIGIN`` token in ``RPATH``, or when the :variable:`CMAKE_SKIP_RPATH`
variable is set. The runtime path set through the
:prop_tgt:`BUILD_RPATH` target property is also unaffected by this
property.

View File

@ -0,0 +1,13 @@
BUILD_WITH_INSTALL_NAME_DIR
---------------------------
``BUILD_WITH_INSTALL_NAME_DIR`` is a boolean specifying whether the macOS
``install_name`` of a target in the build tree uses the directory given by
:prop_tgt:`INSTALL_NAME_DIR`. This setting only applies to targets on macOS.
This property is initialized by the value of the variable
:variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` if it is set when a target is
created.
If this property is not set and policy :policy:`CMP0068` is not ``NEW``, the
value of :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is used in its place.

View File

@ -0,0 +1,15 @@
BUILD_WITH_INSTALL_RPATH
------------------------
``BUILD_WITH_INSTALL_RPATH`` is a boolean specifying whether to link the target
in the build tree with the :prop_tgt:`INSTALL_RPATH`. This takes precedence
over :prop_tgt:`SKIP_BUILD_RPATH` and avoids the need for relinking before
installation.
This property is initialized by the value of the
:variable:`CMAKE_BUILD_WITH_INSTALL_RPATH` variable if it is set when a target
is created.
If policy :policy:`CMP0068` is not ``NEW``, this property also controls use of
:prop_tgt:`INSTALL_NAME_DIR` in the build tree on macOS. Either way, the
:prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property takes precedence.

View File

@ -0,0 +1,9 @@
BUNDLE
------
This target is a ``CFBundle`` on the macOS.
If a module library target has this property set to true it will be
built as a ``CFBundle`` when built on the mac. It will have the directory
structure required for a ``CFBundle`` and will be suitable to be used for
creating Browser Plugins or other application resources.

View File

@ -0,0 +1,8 @@
BUNDLE_EXTENSION
----------------
The file extension used to name a :prop_tgt:`BUNDLE`, a :prop_tgt:`FRAMEWORK`,
or a :prop_tgt:`MACOSX_BUNDLE` target on the macOS and iOS.
The default value is ``bundle``, ``framework``, or ``app`` for the respective
target types.

View File

@ -0,0 +1,22 @@
COMMON_LANGUAGE_RUNTIME
-----------------------
By setting this target property, the target is configured to build with
``C++/CLI`` support.
The Visual Studio generator defines the ``clr`` parameter depending on
the value of ``COMMON_LANGUAGE_RUNTIME``:
* property not set: native C++ (i.e. default)
* property set but empty: mixed unmanaged/managed C++
* property set to any non empty value: managed C++
Supported values: ``""``, ``"pure"``, ``"safe"``
This property is only evaluated :ref:`Visual Studio Generators` for
VS 2010 and above.
To be able to build managed C++ targets with VS 2017 and above the component
``C++/CLI support`` must be installed, which may not be done by default.
See also :prop_tgt:`IMPORTED_COMMON_LANGUAGE_RUNTIME`

View File

@ -0,0 +1,20 @@
COMPATIBLE_INTERFACE_BOOL
-------------------------
Properties which must be compatible with their link interface
The ``COMPATIBLE_INTERFACE_BOOL`` property may contain a list of
properties for this target which must be consistent when evaluated as a
boolean with the ``INTERFACE`` variant of the property in all linked
dependees. For example, if a property ``FOO`` appears in the list, then
for each dependee, the ``INTERFACE_FOO`` property content in all of its
dependencies must be consistent with each other, and with the ``FOO``
property in the depender.
Consistency in this sense has the meaning that if the property is set,
then it must have the same boolean value as all others, and if the
property is not set, then it is ignored.
Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
:ref:`Compatible Interface Properties`.

View File

@ -0,0 +1,18 @@
COMPATIBLE_INTERFACE_NUMBER_MAX
-------------------------------
Properties whose maximum value from the link interface will be used.
The ``COMPATIBLE_INTERFACE_NUMBER_MAX`` property may contain a list of
properties for this target whose maximum value may be read at generate
time when evaluated in the ``INTERFACE`` variant of the property in all
linked dependees. For example, if a property ``FOO`` appears in the list,
then for each dependee, the ``INTERFACE_FOO`` property content in all of
its dependencies will be compared with each other and with the ``FOO``
property in the depender. When reading the ``FOO`` property at generate
time, the maximum value will be returned. If the property is not set,
then it is ignored.
Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
:ref:`Compatible Interface Properties`.

View File

@ -0,0 +1,18 @@
COMPATIBLE_INTERFACE_NUMBER_MIN
-------------------------------
Properties whose maximum value from the link interface will be used.
The ``COMPATIBLE_INTERFACE_NUMBER_MIN`` property may contain a list of
properties for this target whose minimum value may be read at generate
time when evaluated in the ``INTERFACE`` variant of the property of all
linked dependees. For example, if a
property ``FOO`` appears in the list, then for each dependee, the
``INTERFACE_FOO`` property content in all of its dependencies will be
compared with each other and with the ``FOO`` property in the depender.
When reading the ``FOO`` property at generate time, the minimum value
will be returned. If the property is not set, then it is ignored.
Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
:ref:`Compatible Interface Properties`.

View File

@ -0,0 +1,16 @@
COMPATIBLE_INTERFACE_STRING
---------------------------
Properties which must be string-compatible with their link interface
The ``COMPATIBLE_INTERFACE_STRING`` property may contain a list of
properties for this target which must be the same when evaluated as a
string in the ``INTERFACE`` variant of the property all linked dependees.
For example, if a property ``FOO`` appears in the list, then for each
dependee, the ``INTERFACE_FOO`` property content in all of its
dependencies must be equal with each other, and with the ``FOO`` property
in the depender. If the property is not set, then it is ignored.
Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
:ref:`Compatible Interface Properties`.

View File

@ -0,0 +1,25 @@
COMPILE_DEFINITIONS
-------------------
Preprocessor definitions for compiling a target's sources.
The ``COMPILE_DEFINITIONS`` property may be set to a semicolon-separated
list of preprocessor definitions using the syntax ``VAR`` or ``VAR=value``.
Function-style definitions are not supported. CMake will
automatically escape the value correctly for the native build system
(note that CMake language syntax may require escapes to specify some
values).
CMake will automatically drop some definitions that are not supported
by the native build tool.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt
Contents of ``COMPILE_DEFINITIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
The corresponding :prop_tgt:`COMPILE_DEFINITIONS_<CONFIG>` property may
be set to specify per-configuration definitions. Generator expressions
should be preferred instead of setting the alternative property.

View File

@ -0,0 +1,16 @@
COMPILE_DEFINITIONS_<CONFIG>
----------------------------
Ignored. See CMake Policy :policy:`CMP0043`.
Per-configuration preprocessor definitions on a target.
This is the configuration-specific version of :prop_tgt:`COMPILE_DEFINITIONS`
where ``<CONFIG>`` is an upper-case name (ex. ``COMPILE_DEFINITIONS_DEBUG``).
Contents of ``COMPILE_DEFINITIONS_<CONFIG>`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
Generator expressions should be preferred instead of setting this property.

View File

@ -0,0 +1,13 @@
COMPILE_FEATURES
----------------
Compiler features enabled for this target.
The list of features in this property are a subset of the features listed
in the :variable:`CMAKE_C_COMPILE_FEATURES`, :variable:`CMAKE_CUDA_COMPILE_FEATURES`, and
:variable:`CMAKE_CXX_COMPILE_FEATURES` variables.
Contents of ``COMPILE_FEATURES`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for
available expressions. See the :manual:`cmake-compile-features(7)` manual
for information on compile features and a list of supported compilers.

View File

@ -0,0 +1,11 @@
COMPILE_FLAGS
-------------
Additional flags to use when compiling this target's sources.
The ``COMPILE_FLAGS`` property sets additional compiler flags used to
build sources within the target. Use :prop_tgt:`COMPILE_DEFINITIONS`
to pass additional preprocessor definitions.
This property is deprecated. Use the :prop_tgt:`COMPILE_OPTIONS`
property or the :command:`target_compile_options` command instead.

View File

@ -0,0 +1,17 @@
COMPILE_OPTIONS
---------------
List of options to pass to the compiler.
This property holds a :ref:`semicolon-separated list <CMake Language Lists>` of options
specified so far for its target. Use the :command:`target_compile_options`
command to append more options.
This property is initialized by the :prop_dir:`COMPILE_OPTIONS` directory
property when a target is created, and is used by the generators to set
the options for the compiler.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.

View File

@ -0,0 +1,11 @@
COMPILE_PDB_NAME
----------------
Output name for the MS debug symbol ``.pdb`` file generated by the
compiler while building source files.
This property specifies the base name for the debug symbols file.
If not set, the default is unspecified.
.. |PDB_XXX| replace:: :prop_tgt:`PDB_NAME`
.. include:: COMPILE_PDB_NOTE.txt

View File

@ -0,0 +1,10 @@
COMPILE_PDB_NAME_<CONFIG>
-------------------------
Per-configuration output name for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
This is the configuration-specific version of :prop_tgt:`COMPILE_PDB_NAME`.
.. |PDB_XXX| replace:: :prop_tgt:`PDB_NAME_<CONFIG>`
.. include:: COMPILE_PDB_NOTE.txt

View File

@ -0,0 +1,5 @@
.. note::
The compiler-generated program database files are specified by the
``/Fd`` compiler flag and are not the same as linker-generated
program database files specified by the ``/pdb`` linker flag.
Use the |PDB_XXX| property to specify the latter.

View File

@ -0,0 +1,13 @@
COMPILE_PDB_OUTPUT_DIRECTORY
----------------------------
Output directory for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
This property specifies the directory into which the MS debug symbols
will be placed by the compiler. This property is initialized by the
value of the :variable:`CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY` variable
if it is set when a target is created.
.. |PDB_XXX| replace:: :prop_tgt:`PDB_OUTPUT_DIRECTORY`
.. include:: COMPILE_PDB_NOTE.txt

View File

@ -0,0 +1,16 @@
COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
-------------------------------------
Per-configuration output directory for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
This is a per-configuration version of
:prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY`,
but multi-configuration generators (Visual Studio, Xcode) do NOT append a
per-configuration subdirectory to the specified directory. This
property is initialized by the value of the
:variable:`CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>` variable
if it is set when a target is created.
.. |PDB_XXX| replace:: :prop_tgt:`PDB_OUTPUT_DIRECTORY_<CONFIG>`
.. include:: COMPILE_PDB_NOTE.txt

View File

@ -0,0 +1,8 @@
<CONFIG>_OUTPUT_NAME
--------------------
Old per-configuration target file base name.
Use :prop_tgt:`OUTPUT_NAME_<CONFIG>` instead.
This is a configuration-specific version of the :prop_tgt:`OUTPUT_NAME`
target property.

View File

@ -0,0 +1,13 @@
<CONFIG>_POSTFIX
----------------
Postfix to append to the target file name for configuration <CONFIG>.
When building with configuration <CONFIG> the value of this property
is appended to the target file name built on disk. For non-executable
targets, this property is initialized by the value of the variable
CMAKE_<CONFIG>_POSTFIX if it is set when a target is created. This
property is ignored on the Mac for Frameworks and App Bundles.
For macOS see also the :prop_tgt:`FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>`
target property.

View File

@ -0,0 +1,15 @@
CROSSCOMPILING_EMULATOR
-----------------------
Use the given emulator to run executables created when crosscompiling.
This command will be added as a prefix to :command:`add_test`,
:command:`add_custom_command`, and :command:`add_custom_target` commands
for built target system executables.
If this property contains a :ref:`semicolon-separated list <CMake Language
Lists>`, then the first value is the command and remaining values are its
arguments.
This property is initialized by the value of the
:variable:`CMAKE_CROSSCOMPILING_EMULATOR` variable if it is set when a target
is created.

View File

@ -0,0 +1,40 @@
CUDA_ARCHITECTURES
------------------
List of architectures to generate device code for.
An architecture can be suffixed by either ``-real`` or ``-virtual`` to specify
the kind of architecture to generate code for.
If no suffix is given then code is generated for both real and virtual
architectures.
A non-empty false value (e.g. ``OFF``) disables adding architectures.
This is intended to support packagers and rare cases where full control
over the passed flags is required.
This property is initialized by the value of the :variable:`CMAKE_CUDA_ARCHITECTURES`
variable if it is set when a target is created.
The ``CUDA_ARCHITECTURES`` target property must be set to a non-empty value on targets
that compile CUDA sources, or it is an error. See policy :policy:`CMP0104`.
Examples
^^^^^^^^
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
Generates code for real and virtual architectures ``30``, ``50`` and ``72``.
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)
Generates code for real architecture ``70`` and virtual architecture ``72``.
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)
CMake will not pass any architecture flags to the compiler.

View File

@ -0,0 +1,17 @@
CUDA_EXTENSIONS
---------------
Boolean specifying whether compiler specific extensions are requested.
This property specifies whether compiler specific extensions should be
used. For some compilers, this results in adding a flag such
as ``-std=gnu++11`` instead of ``-std=c++11`` to the compile line. This
property is ``ON`` by default. The basic CUDA/C++ standard level is
controlled by the :prop_tgt:`CUDA_STANDARD` target property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CUDA_EXTENSIONS` variable if it is set when a target
is created.

View File

@ -0,0 +1,12 @@
CUDA_PTX_COMPILATION
--------------------
Compile CUDA sources to ``.ptx`` files instead of ``.obj`` files
within :ref:`Object Libraries`.
For example:
.. code-block:: cmake
add_library(myptx OBJECT a.cu b.cu)
set_property(TARGET myptx PROPERTY CUDA_PTX_COMPILATION ON)

View File

@ -0,0 +1,25 @@
CUDA_RESOLVE_DEVICE_SYMBOLS
---------------------------
CUDA only: Enables device linking for the specific library target where
required.
If set, this will tell the required compilers to enable device linking
on the library target. Device linking is an additional link step
required by some CUDA compilers when :prop_tgt:`CUDA_SEPARABLE_COMPILATION` is
enabled. Normally device linking is deferred until a shared library or
executable is generated, allowing for multiple static libraries to resolve
device symbols at the same time when they are used by a shared library or
executable.
By default static library targets have this property is disabled,
while shared, module, and executable targets have this property enabled.
Note that device linking is not supported for :ref:`Object Libraries`.
For instance:
.. code-block:: cmake
set_property(TARGET mystaticlib PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)

View File

@ -0,0 +1,9 @@
``None``
Link with ``-cudart=none`` or equivalent flag(s) to use no CUDA
runtime library.
``Shared``
Link with ``-cudart=shared`` or equivalent flag(s) to use a
dynamically-linked CUDA runtime library.
``Static``
Link with ``-cudart=static`` or equivalent flag(s) to use a
statically-linked CUDA runtime library.

View File

@ -0,0 +1,21 @@
CUDA_RUNTIME_LIBRARY
--------------------
Select the CUDA runtime library for use by compilers targeting the CUDA language.
The allowed case insensitive values are:
.. include:: CUDA_RUNTIME_LIBRARY-VALUES.txt
Contents of ``CUDA_RUNTIME_LIBRARY`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.
If that property is not set then CMake uses an appropriate default
value based on the compiler to select the CUDA runtime library.
.. note::
This property has effect only when the ``CUDA`` language is enabled. To
control the CUDA runtime linking when only using the CUDA SDK with the
``C`` or ``C++`` language we recommend using the :module:`FindCUDAToolkit`
module.

View File

@ -0,0 +1,17 @@
CUDA_SEPARABLE_COMPILATION
--------------------------
CUDA only: Enables separate compilation of device code
If set this will enable separable compilation for all CUDA files for
the given target.
For instance:
.. code-block:: cmake
set_property(TARGET myexe PROPERTY CUDA_SEPARABLE_COMPILATION ON)
This property is initialized by the value of the
:variable:`CMAKE_CUDA_SEPARABLE_COMPILATION` variable if it is set when a
target is created.

View File

@ -0,0 +1,32 @@
CUDA_STANDARD
-------------
The CUDA/C++ standard whose features are requested to build this target.
This property specifies the CUDA/C++ standard whose features are requested
to build this target. For some compilers, this results in adding a
flag such as ``-std=gnu++11`` to the compile line.
Supported values are ``98``, ``03``, ``11``, ``14``, ``17``, ``20``.
If the value requested does not result in a compile flag being added for
the compiler in use, a previous standard flag will be added instead. This
means that using:
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_STANDARD 11)
with a compiler which does not support ``-std=gnu++11`` or an equivalent
flag will not result in an error or warning, but will instead add the
``-std=gnu++98`` flag if supported. This "decay" behavior may be controlled
with the :prop_tgt:`CUDA_STANDARD_REQUIRED` target property.
Additionally, the :prop_tgt:`CUDA_EXTENSIONS` target property may be used to
control whether compiler-specific extensions are enabled on a per-target basis.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CUDA_STANDARD` variable if it is set when a target
is created.

View File

@ -0,0 +1,18 @@
CUDA_STANDARD_REQUIRED
----------------------
Boolean describing whether the value of :prop_tgt:`CUDA_STANDARD` is a requirement.
If this property is set to ``ON``, then the value of the
:prop_tgt:`CUDA_STANDARD` target property is treated as a requirement. If this
property is ``OFF`` or unset, the :prop_tgt:`CUDA_STANDARD` target property is
treated as optional and may "decay" to a previous standard if the requested is
not available. For compilers that have no notion of a standard level, such as
MSVC, this has no effect.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CUDA_STANDARD_REQUIRED` variable if it is set when a
target is created.

View File

@ -0,0 +1,17 @@
CXX_EXTENSIONS
--------------
Boolean specifying whether compiler specific extensions are requested.
This property specifies whether compiler specific extensions should be
used. For some compilers, this results in adding a flag such
as ``-std=gnu++11`` instead of ``-std=c++11`` to the compile line. This
property is ``ON`` by default. The basic C++ standard level is
controlled by the :prop_tgt:`CXX_STANDARD` target property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CXX_EXTENSIONS` variable if it is set when a target
is created.

View File

@ -0,0 +1,34 @@
CXX_STANDARD
------------
The C++ standard whose features are requested to build this target.
This property specifies the C++ standard whose features are requested
to build this target. For some compilers, this results in adding a
flag such as ``-std=gnu++11`` to the compile line. For compilers that
have no notion of a standard level, such as Microsoft Visual C++ before
2015 Update 3, this has no effect.
Supported values are ``98``, ``11``, ``14``, ``17``, and ``20``.
If the value requested does not result in a compile flag being added for
the compiler in use, a previous standard flag will be added instead. This
means that using:
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CXX_STANDARD 11)
with a compiler which does not support ``-std=gnu++11`` or an equivalent
flag will not result in an error or warning, but will instead add the
``-std=gnu++98`` flag if supported. This "decay" behavior may be controlled
with the :prop_tgt:`CXX_STANDARD_REQUIRED` target property.
Additionally, the :prop_tgt:`CXX_EXTENSIONS` target property may be used to
control whether compiler-specific extensions are enabled on a per-target basis.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CXX_STANDARD` variable if it is set when a target
is created.

View File

@ -0,0 +1,18 @@
CXX_STANDARD_REQUIRED
---------------------
Boolean describing whether the value of :prop_tgt:`CXX_STANDARD` is a requirement.
If this property is set to ``ON``, then the value of the
:prop_tgt:`CXX_STANDARD` target property is treated as a requirement. If this
property is ``OFF`` or unset, the :prop_tgt:`CXX_STANDARD` target property is
treated as optional and may "decay" to a previous standard if the requested is
not available. For compilers that have no notion of a standard level, such as
MSVC, this has no effect.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_CXX_STANDARD_REQUIRED` variable if it is set when a
target is created.

View File

@ -0,0 +1,17 @@
C_EXTENSIONS
------------
Boolean specifying whether compiler specific extensions are requested.
This property specifies whether compiler specific extensions should be
used. For some compilers, this results in adding a flag such
as ``-std=gnu11`` instead of ``-std=c11`` to the compile line. This
property is ``ON`` by default. The basic C standard level is
controlled by the :prop_tgt:`C_STANDARD` target property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_C_EXTENSIONS` variable if it is set when a target
is created.

View File

@ -0,0 +1,34 @@
C_STANDARD
----------
The C standard whose features are requested to build this target.
This property specifies the C standard whose features are requested
to build this target. For some compilers, this results in adding a
flag such as ``-std=gnu11`` to the compile line. For compilers that
have no notion of a C standard level, such as all versions of
MSVC known as of this version of CMake, this has no effect.
Supported values are ``90``, ``99`` and ``11``.
If the value requested does not result in a compile flag being added for
the compiler in use, a previous standard flag will be added instead. This
means that using:
.. code-block:: cmake
set_property(TARGET tgt PROPERTY C_STANDARD 11)
with a compiler which does not support ``-std=gnu11`` or an equivalent
flag will not result in an error or warning, but will instead add the
``-std=gnu99`` or ``-std=gnu90`` flag if supported. This "decay" behavior may
be controlled with the :prop_tgt:`C_STANDARD_REQUIRED` target property.
Additionally, the :prop_tgt:`C_EXTENSIONS` target property may be used to
control whether compiler-specific extensions are enabled on a per-target basis.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_C_STANDARD` variable if it is set when a target
is created.

View File

@ -0,0 +1,18 @@
C_STANDARD_REQUIRED
-------------------
Boolean describing whether the value of :prop_tgt:`C_STANDARD` is a requirement.
If this property is set to ``ON``, then the value of the
:prop_tgt:`C_STANDARD` target property is treated as a requirement. If this
property is ``OFF`` or unset, the :prop_tgt:`C_STANDARD` target property is
treated as optional and may "decay" to a previous standard if the requested is
not available. For compilers that have no notion of a standard level, such as
MSVC, this has no effect.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
This property is initialized by the value of
the :variable:`CMAKE_C_STANDARD_REQUIRED` variable if it is set when a
target is created.

View File

@ -0,0 +1,7 @@
DEBUG_POSTFIX
-------------
See target property ``<CONFIG>_POSTFIX``.
This property is a special case of the more-general ``<CONFIG>_POSTFIX``
property for the ``DEBUG`` configuration.

View File

@ -0,0 +1,11 @@
DEFINE_SYMBOL
-------------
Define a symbol when compiling this target's sources.
``DEFINE_SYMBOL`` sets the name of the preprocessor symbol defined when
compiling sources in a shared library. If not set here then it is set
to ``target_EXPORTS`` by default (with some substitutions if the target is
not a valid C identifier). This is useful for headers to know whether
they are being included from inside their library or outside to
properly setup dllexport/dllimport decorations.

View File

@ -0,0 +1,18 @@
DEPLOYMENT_ADDITIONAL_FILES
---------------------------
Set the WinCE project ``AdditionalFiles`` in ``DeploymentTool`` in ``.vcproj``
files generated by the :generator:`Visual Studio 9 2008` generator.
This is useful when you want to debug on remote WinCE device.
Specify additional files that will be copied to the device.
For example:
.. code-block:: cmake
set_property(TARGET ${TARGET} PROPERTY
DEPLOYMENT_ADDITIONAL_FILES "english.lng|local_folder|remote_folder|0"
"german.lng|local_folder|remote_folder|0")
produces::
<DeploymentTool AdditionalFiles="english.lng|local_folder|remote_folder|0;german.lng|local_folder|remote_folder|0" ... />

View File

@ -0,0 +1,18 @@
DEPLOYMENT_REMOTE_DIRECTORY
---------------------------
Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and
``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated
by the :generator:`Visual Studio 9 2008` generator.
This is useful when you want to debug on remote WinCE device.
For example:
.. code-block:: cmake
set_property(TARGET ${TARGET} PROPERTY
DEPLOYMENT_REMOTE_DIRECTORY "\\FlashStorage")
produces::
<DeploymentTool RemoteDirectory="\FlashStorage" ... />
<DebuggerTool RemoteExecutable="\FlashStorage\target_file" ... />

View File

@ -0,0 +1,7 @@
DEPRECATION
-----------
Deprecation message from imported target's developer.
``DEPRECATION`` is the message regarding a deprecation status to be displayed
to downstream users of a target.

View File

@ -0,0 +1,8 @@
DISABLE_PRECOMPILE_HEADERS
--------------------------
Disables the precompilation of header files specified by
:prop_tgt:`PRECOMPILE_HEADERS` property.
If the property is not set, CMake will use the value provided
by :variable:`CMAKE_DISABLE_PRECOMPILE_HEADERS`.

View File

@ -0,0 +1,13 @@
DOTNET_TARGET_FRAMEWORK
-----------------------
Specify the .NET target framework.
Used to specify the .NET target framework for C++/CLI and C#. For
example: ``netcoreapp2.1``.
This property is only evaluated for :ref:`Visual Studio Generators`
VS 2010 and above.
Can be initialized for all targets using the variable
:variable:`CMAKE_DOTNET_TARGET_FRAMEWORK`.

View File

@ -0,0 +1,15 @@
DOTNET_TARGET_FRAMEWORK_VERSION
-------------------------------
Specify the .NET target framework version.
Used to specify the .NET target framework version for C++/CLI and C#.
For example: ``v4.5``.
This property is only evaluated for :ref:`Visual Studio Generators`
VS 2010 and above.
To initialize this variable for all targets set
:variable:`CMAKE_DOTNET_TARGET_FRAMEWORK` or
:variable:`CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION`. If both are set,
the latter is ignored.

View File

@ -0,0 +1,31 @@
ENABLE_EXPORTS
--------------
Specify whether an executable exports symbols for loadable modules.
Normally an executable does not export any symbols because it is the
final program. It is possible for an executable to export symbols to
be used by loadable modules. When this property is set to true CMake
will allow other targets to "link" to the executable with the
:command:`target_link_libraries` command. On all platforms a target-level
dependency on the executable is created for targets that link to it.
Handling of the executable on the link lines of the loadable modules
varies by platform:
* On Windows-based systems (including Cygwin) an "import library" is
created along with the executable to list the exported symbols.
Loadable modules link to the import library to get the symbols.
* On macOS, loadable modules link to the executable itself using the
``-bundle_loader`` flag.
* On AIX, a linker "import file" is created along with the executable
to list the exported symbols for import when linking other targets.
Loadable modules link to the import file to get the symbols.
* On other platforms, loadable modules are simply linked without
referencing the executable since the dynamic loader will
automatically bind symbols when the module is loaded.
This property is initialized by the value of the variable
:variable:`CMAKE_ENABLE_EXPORTS` if it is set when a target is created.

View File

@ -0,0 +1,21 @@
EXCLUDE_FROM_ALL
----------------
Set this target property to a true (or false) value to exclude (or include)
the target from the "all" target of the containing directory and its
ancestors. If excluded, running e.g. ``make`` in the containing directory
or its ancestors will not build the target by default.
If this target property is not set then the target will be included in
the "all" target of the containing directory. Furthermore, it will be
included in the "all" target of its ancestor directories unless the
:prop_dir:`EXCLUDE_FROM_ALL` directory property is set.
With ``EXCLUDE_FROM_ALL`` set to false or not set at all, the target
will be brought up to date as part of doing a ``make install`` or its
equivalent for the CMake generator being used.
If a target has ``EXCLUDE_FROM_ALL`` set to true, it may still be listed
in an :command:`install(TARGETS)` command, but the user is responsible for
ensuring that the target's build artifacts are not missing or outdated when
an install is performed.

View File

@ -0,0 +1,8 @@
EXCLUDE_FROM_DEFAULT_BUILD
--------------------------
Exclude target from ``Build Solution``.
This property is only used by Visual Studio generators.
When set to ``TRUE``, the target will not be built when you press
``Build Solution``.

View File

@ -0,0 +1,10 @@
EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>
-----------------------------------
Per-configuration version of target exclusion from ``Build Solution``.
This is the configuration-specific version of
:prop_tgt:`EXCLUDE_FROM_DEFAULT_BUILD`. If the generic
:prop_tgt:`EXCLUDE_FROM_DEFAULT_BUILD` is also set on a target,
``EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>`` takes
precedence in configurations for which it has a value.

View File

@ -0,0 +1,8 @@
EXPORT_NAME
-----------
Exported name for target files.
This sets the name for the ``IMPORTED`` target generated by the
:command:`install(EXPORT)` and :command:`export` commands.
If not set, the logical target name is used by default.

View File

@ -0,0 +1,14 @@
EXPORT_PROPERTIES
-----------------
List additional properties to export for a target.
This property contains a list of property names that should be exported by
the :command:`install(EXPORT)` and :command:`export` commands. By default
only a limited number of properties are exported. This property can be used
to additionally export other properties as well.
Properties starting with ``INTERFACE_`` or ``IMPORTED_`` are not allowed as
they are reserved for internal CMake use.
Properties containing generator expressions are also not allowed.

View File

@ -0,0 +1,7 @@
EchoString
----------
A message to be displayed when the target is built.
A message to display on some generators (such as :ref:`Makefile Generators`)
when the target is built.

View File

@ -0,0 +1,13 @@
FOLDER
------
Set the folder name. Use to organize targets in an IDE.
Targets with no ``FOLDER`` property will appear as top level entities in
IDEs like Visual Studio. Targets with the same ``FOLDER`` property value
will appear next to each other in a folder of that name. To nest
folders, use ``FOLDER`` values such as 'GUI/Dialogs' with '/' characters
separating folder levels.
This property is initialized by the value of the variable
:variable:`CMAKE_FOLDER` if it is set when a target is created.

View File

@ -0,0 +1,37 @@
FRAMEWORK
---------
Build ``SHARED`` or ``STATIC`` library as Framework Bundle on the macOS and iOS.
If such a library target has this property set to ``TRUE`` it will be
built as a framework when built on the macOS and iOS. It will have the
directory structure required for a framework and will be suitable to
be used with the ``-framework`` option. This property is initialized by the
value of the :variable:`CMAKE_FRAMEWORK` variable if it is set when a target is
created.
To customize ``Info.plist`` file in the framework, use
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
For macOS see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
Example of creation ``dynamicFramework``:
.. code-block:: cmake
add_library(dynamicFramework SHARED
dynamicFramework.c
dynamicFramework.h
)
set_target_properties(dynamicFramework PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION C
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
MACOSX_FRAMEWORK_INFO_PLIST Info.plist
# "current version" in semantic format in Mach-O binary file
VERSION 16.4.0
# "compatibility version" in semantic format in Mach-O binary file
SOVERSION 1.0.0
PUBLIC_HEADER dynamicFramework.h
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
)

Some files were not shown because too many files have changed in this diff Show More