Merge topic 'InstallRequiredSystemLibraries-COMPONENT'

e97141c2 InstallRequiredSystemLibraries: Add option to specify install COMPONENT
d6a320ab InstallRequiredSystemLibraries: Format documentation
This commit is contained in:
Brad King 2015-03-04 08:52:14 -05:00 committed by CMake Topic Stage
commit df5def5334
2 changed files with 52 additions and 27 deletions

View File

@ -0,0 +1,6 @@
InstallRequiredSystemLibraries-COMPONENT
----------------------------------------
* The :module:`InstallRequiredSystemLibraries` module learned a new
``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT`` option to specify the
installation component.

View File

@ -2,36 +2,49 @@
# InstallRequiredSystemLibraries # InstallRequiredSystemLibraries
# ------------------------------ # ------------------------------
# #
# Include this module to search for compiler-provided system runtime
# libraries and add install rules for them. Some optional variables
# may be set prior to including the module to adjust behavior:
# #
# ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS``
# Specify additional runtime libraries that may not be detected.
# After inclusion any detected libraries will be appended to this.
# #
# By including this file, all library files listed in the variable # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP``
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with # Set to TRUE to skip calling the :command:`install(PROGRAMS)` command to
# install(PROGRAMS ...) into bin for WIN32 and lib for non-WIN32. If # allow the includer to specify its own install rule, using the value of
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before including # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS`` to get the list of libraries.
# this file, then the INSTALL command is not called. The user can use #
# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install # ``CMAKE_INSTALL_DEBUG_LIBRARIES``
# command and install them however they want. If it is the MSVC # Set to TRUE to install the debug runtime libraries when available
# compiler, then the microsoft run time libraries will be found and # with MSVC tools.
# automatically added to the CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS, and #
# installed. If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC # ``CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY``
# compiler, then the debug libraries are installed when available. If # Set to TRUE to install only the debug runtime libraries with MSVC
# CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then only the debug # tools even if the release runtime libraries are also available.
# libraries are installed when both debug and release are available. If #
# CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are # ``CMAKE_INSTALL_MFC_LIBRARIES``
# installed as well as the CRT run time libraries. If # Set to TRUE to install the MSVC MFC runtime libraries.
# CMAKE_INSTALL_OPENMP_LIBRARIES is set then the OpenMP run time libraries #
# are installed as well. If # ``CMAKE_INSTALL_OPENMP_LIBRARIES``
# CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are # Set to TRUE to install the MSVC OpenMP runtime libraries
# installed to that directory rather than the default. If #
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this # ``CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION``
# file warns about required files that do not exist. You can set this # Specify the :command:`install(PROGRAMS)` command ``DESTINATION``
# variable to ON before including this file to avoid the warning. For # option. If not specified, the default is ``bin`` on Windows
# example, the Visual Studio Express editions do not include the # and ``lib`` elsewhere.
# redistributable files, so if you include this file on a machine with #
# only VS Express installed, you'll get the warning. # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS``
# Set to TRUE to disable warnings about required library files that
# do not exist. (For example, Visual Studio Express editions may
# not provide the redistributable files.)
#
# ``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT``
# Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
# option. If not specified, no such option will be used.
#============================================================================= #=============================================================================
# Copyright 2006-2009 Kitware, Inc. # Copyright 2006-2015 Kitware, Inc.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -477,7 +490,13 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib) set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
endif() endif()
endif() endif()
if(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT)
set(_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT
COMPONENT ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT})
endif()
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}) DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
)
endif() endif()
endif() endif()