diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-23 16:07:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-12-24 12:02:49 (GMT) |
commit | cbe7e8fae48b3663e784bb37d5f66bf8b3eb0546 (patch) | |
tree | 910046c109660f4533f0ec6ceec1de485e3032d2 /Help | |
parent | e73d1ad003c50730a8141db757462574c0c2dddc (diff) | |
download | CMake-cbe7e8fae48b3663e784bb37d5f66bf8b3eb0546.zip CMake-cbe7e8fae48b3663e784bb37d5f66bf8b3eb0546.tar.gz CMake-cbe7e8fae48b3663e784bb37d5f66bf8b3eb0546.tar.bz2 |
export: Implement EXPORT subcommand (#9822)
Teach the export command to handle export sets defined by invocations
of install(TARGETS ... EXPORT foo). This makes maintenance of targets
exported to both the build tree and install tree trivial.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/export.rst | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/Help/command/export.rst b/Help/command/export.rst index c293340..6b83587 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -5,8 +5,7 @@ Export targets from the build tree for use by outside projects. :: - export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>] - [APPEND] FILE <filename> [EXPORT_LINK_INTERFACE_LIBRARIES]) + export(EXPORT <export-name> [NAMESPACE <namespace>] [FILE <filename>]) Create a file <filename> that may be included by outside projects to import targets from the current project's build tree. This is useful @@ -14,14 +13,10 @@ during cross-compiling to build utility executables that can run on the host platform in one project and then import them into another project being compiled for the target platform. If the NAMESPACE option is given the <namespace> string will be prepended to all target -names written to the file. If the APPEND option is given the -generated code will be appended to the file instead of overwriting it. -The EXPORT_LINK_INTERFACE_LIBRARIES keyword, if present, causes the -contents of the properties matching -``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?`` to be exported, when -policy CMP0022 is NEW. If a library target is included in the export -but a target to which it links is not included the behavior is -unspecified. +names written to the file. + +Target installations are associated with the export <export-name> +using the ``EXPORT`` option of the :command:`install(TARGETS)` command. The file created by this command is specific to the build tree and should never be installed. See the install(EXPORT) command to export @@ -32,6 +27,21 @@ same values as the final values of the input TARGETS. :: + export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>] + [APPEND] FILE <filename> [EXPORT_LINK_INTERFACE_LIBRARIES]) + +This signature is similar to the ``EXPORT`` signature, but targets are listed +explicitly rather than specified as an export-name. If the APPEND option is +given the generated code will be appended to the file instead of overwriting it. +The EXPORT_LINK_INTERFACE_LIBRARIES keyword, if present, causes the +contents of the properties matching +``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?`` to be exported, when +policy CMP0022 is NEW. If a library target is included in the export +but a target to which it links is not included the behavior is +unspecified. + +:: + export(PACKAGE <name>) Store the current build directory in the CMake user package registry |