diff options
author | Brad King <brad.king@kitware.com> | 2014-10-22 19:52:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-22 19:52:31 (GMT) |
commit | 58b2d760ee094e6f1a4a8701f86efcb81977b047 (patch) | |
tree | 2cf1d02b16f8519155779e052dd21639894fb226 /Modules/CMakePackageConfigHelpers.cmake | |
parent | 54ff77dc621a91302abad0ab38d9bd26de8914b9 (diff) | |
download | CMake-58b2d760ee094e6f1a4a8701f86efcb81977b047.zip CMake-58b2d760ee094e6f1a4a8701f86efcb81977b047.tar.gz CMake-58b2d760ee094e6f1a4a8701f86efcb81977b047.tar.bz2 |
Modules: Format documentation to avoid over-long preformatted lines
Convert several preformatted code block literals that enumerate lists of
options or variables to use reST definition lists instead. Manually
wrap other long lines in code blocks.
Diffstat (limited to 'Modules/CMakePackageConfigHelpers.cmake')
-rw-r--r-- | Modules/CMakePackageConfigHelpers.cmake | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index c6dc141..206ea7a 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -15,12 +15,13 @@ # # Create a config file for a project:: # -# configure_package_config_file(<input> <output> INSTALL_DESTINATION <path> -# [PATH_VARS <var1> <var2> ... <varN>] -# [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] -# [INSTALL_PREFIX <path>]) -# +# configure_package_config_file(<input> <output> +# INSTALL_DESTINATION <path> +# [PATH_VARS <var1> <var2> ... <varN>] +# [NO_SET_AND_CHECK_MACRO] +# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] +# [INSTALL_PREFIX <path>] +# ) # # ``configure_package_config_file()`` should be used instead of the plain # :command:`configure_file()` command when creating the ``<Name>Config.cmake`` @@ -51,13 +52,13 @@ # Using ``configure_package_config_file`` helps. If used correctly, it makes # the resulting ``FooConfig.cmake`` file relocatable. Usage: # -# 1. write a ``FooConfig.cmake.in`` file as you are used to -# 2. insert a line containing only the string ``@PACKAGE_INIT@`` -# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use -# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the -# ``@PACKAGE_INIT@`` line) -# 4. instead of using the normal :command:`configure_file()`, use -# ``configure_package_config_file()`` +# 1. write a ``FooConfig.cmake.in`` file as you are used to +# 2. insert a line containing only the string ``@PACKAGE_INIT@`` +# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use +# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the +# ``@PACKAGE_INIT@`` line) +# 4. instead of using the normal :command:`configure_file()`, use +# ``configure_package_config_file()`` # # # @@ -116,9 +117,9 @@ # # Create a version file for a project:: # -# write_basic_package_version_file(<filename> -# [VERSION <major.minor.patch>] -# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|ExactVersion> ) +# write_basic_package_version_file(<filename> +# [VERSION <major.minor.patch>] +# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|ExactVersion> ) # # # Writes a file for use as ``<package>ConfigVersion.cmake`` file to @@ -172,13 +173,16 @@ # set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE ) # ... # include(CMakePackageConfigHelpers) -# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake -# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake -# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR) -# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake -# VERSION 1.2.3 -# COMPATIBILITY SameMajorVersion ) -# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake +# configure_package_config_file(FooConfig.cmake.in +# ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake +# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake +# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR) +# write_basic_package_version_file( +# ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake +# VERSION 1.2.3 +# COMPATIBILITY SameMajorVersion ) +# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake +# ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake # DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) # # ``FooConfig.cmake.in``: |