diff options
Diffstat (limited to 'Help/command/add_library.rst')
-rw-r--r-- | Help/command/add_library.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 7dc4365..43cefca 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -85,8 +85,8 @@ Creates an :ref:`Object Library <Object Libraries>`. An object library compiles source files but does not archive or link their object files into a library. Instead other targets created by :command:`add_library` or :command:`add_executable` may reference the objects using an expression of the -form ``$<TARGET_OBJECTS:objlib>`` as a source, where ``objlib`` is the -object library name. For example: +form :genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>` as a source, where +``objlib`` is the object library name. For example: .. code-block:: cmake @@ -101,7 +101,7 @@ They may contain custom commands generating such sources, but not ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands. Some native build systems (such as Xcode) may not like targets that have only object files, so consider adding at least one real source file to any target that references -``$<TARGET_OBJECTS:objlib>``. +:genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>`. .. versionadded:: 3.12 Object libraries can be linked to with :command:`target_link_libraries`. @@ -261,3 +261,8 @@ to modify properties of ``<target>``, that is, it may not be used as the operand of :command:`set_property`, :command:`set_target_properties`, :command:`target_link_libraries` etc. An ``ALIAS`` target may not be installed or exported. + +See Also +^^^^^^^^ + +* :command:`add_executable` |