CMakePackageConfigHelpers: Fix generate_apple_platform_selection_file docs

Previously the documentation was not rendered correctly.
This commit is contained in:
Brad King
2023-12-18 16:34:33 -05:00
parent edb10c5325
commit 1a6303aa8c

View File

@@ -193,64 +193,66 @@ point to create more sophisticated custom ``ConfigVersion.cmake`` files.
Generating an Apple Platform Selection File
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.29
.. command:: generate_apple_platform_selection_file
Create an Apple platform selection file:
.. versionadded:: 3.29
generate_apple_platform_selection_file(<filename>
INSTALL_DESTINATION <path>
[MACOS_CONFIG_FILE <file>]
[IOS_CONFIG_FILE <file>]
[IOS_SIMULATOR_CONFIG_FILE <file>]
[TVOS_CONFIG_FILE <file>]
[TVOS_SIMULATOR_CONFIG_FILE <file>]
[WATCHOS_CONFIG_FILE <file>]
[WATCHOS_SIMULATOR_CONFIG_FILE <file>]
[VISIONOS_CONFIG_FILE <file>]
[VISIONOS_SIMULATOR_CONFIG_FILE <file>]
)
Create an Apple platform selection file:
Writes a file for use as ``<PackageName>Config.cmake`` which can include an
Apple-platform-specific ``<PackageName>Config.cmake`` from a different
directory. This can be used in conjunction with the ``XCFRAMEWORK_LOCATION``
argument of :command:`export(SETUP)` to export packages in a way that a project
built for any Apple platform can use them.
.. code-block:: cmake
``INSTALL_DESTINATION <path>``
Path that the file will be installed to.
generate_apple_platform_selection_file(<filename>
INSTALL_DESTINATION <path>
[MACOS_CONFIG_FILE <file>]
[IOS_CONFIG_FILE <file>]
[IOS_SIMULATOR_CONFIG_FILE <file>]
[TVOS_CONFIG_FILE <file>]
[TVOS_SIMULATOR_CONFIG_FILE <file>]
[WATCHOS_CONFIG_FILE <file>]
[WATCHOS_SIMULATOR_CONFIG_FILE <file>]
[VISIONOS_CONFIG_FILE <file>]
[VISIONOS_SIMULATOR_CONFIG_FILE <file>]
)
``MACOS_CONFIG_FILE <file>``
File to include if the platform is macOS.
Writes a file for use as ``<PackageName>Config.cmake`` which can include an
Apple-platform-specific ``<PackageName>Config.cmake`` from a different
directory. This can be used in conjunction with the ``XCFRAMEWORK_LOCATION``
argument of :command:`export(SETUP)` to export packages in a way that a project
built for any Apple platform can use them.
``IOS_CONFIG_FILE <file>``
File to include if the platform is iOS.
``INSTALL_DESTINATION <path>``
Path that the file will be installed to.
``IOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is iOS Simulator.
``MACOS_CONFIG_FILE <file>``
File to include if the platform is macOS.
``TVOS_CONFIG_FILE <file>``
File to include if the platform is tvOS.
``IOS_CONFIG_FILE <file>``
File to include if the platform is iOS.
``TVOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is tvOS Simulator.
``IOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is iOS Simulator.
``WATCHOS_CONFIG_FILE <file>``
File to include if the platform is watchOS.
``TVOS_CONFIG_FILE <file>``
File to include if the platform is tvOS.
``WATCHOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is watchOS Simulator.
``TVOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is tvOS Simulator.
``VISIONOS_CONFIG_FILE <file>``
File to include if the platform is visionOS.
``WATCHOS_CONFIG_FILE <file>``
File to include if the platform is watchOS.
``VISIONOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is visionOS Simulator.
``WATCHOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is watchOS Simulator.
If any of the optional config files are not specified, and the consuming
project is built for their corresponding platform, an error will be thrown
when including the generated file.
``VISIONOS_CONFIG_FILE <file>``
File to include if the platform is visionOS.
``VISIONOS_SIMULATOR_CONFIG_FILE <file>``
File to include if the platform is visionOS Simulator.
If any of the optional config files are not specified, and the consuming
project is built for their corresponding platform, an error will be thrown
when including the generated file.
Example Generating Package Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^