summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Andruejol <johan.andruejol@kitware.com>2015-03-02 19:28:14 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-03 14:17:47 (GMT)
commite97141c2bc11d1cda3adc2579eeab53620d3b921 (patch)
tree020cda78e5a1f11342a90b81b86641fbe15212ee
parentd6a320ab5ef12459b98fae2711b9a386b4a01466 (diff)
downloadCMake-e97141c2bc11d1cda3adc2579eeab53620d3b921.zip
CMake-e97141c2bc11d1cda3adc2579eeab53620d3b921.tar.gz
CMake-e97141c2bc11d1cda3adc2579eeab53620d3b921.tar.bz2
InstallRequiredSystemLibraries: Add option to specify install COMPONENT
Previously the module did not support projects using installation components because install(PROGRAMS) was never called with COMPONENT. Add an option to specify the COMPONENT so that projects doing this do not have to resort to using CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP and writing the install rule by hand.
-rw-r--r--Help/release/dev/InstallRequiredSystemLibraries-COMPONENT.rst6
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake14
2 files changed, 18 insertions, 2 deletions
diff --git a/Help/release/dev/InstallRequiredSystemLibraries-COMPONENT.rst b/Help/release/dev/InstallRequiredSystemLibraries-COMPONENT.rst
new file mode 100644
index 0000000..e6ebc2d
--- /dev/null
+++ b/Help/release/dev/InstallRequiredSystemLibraries-COMPONENT.rst
@@ -0,0 +1,6 @@
+InstallRequiredSystemLibraries-COMPONENT
+----------------------------------------
+
+* The :module:`InstallRequiredSystemLibraries` module learned a new
+ ``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT`` option to specify the
+ installation component.
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index bd7f5b2..c7e88ba 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -38,9 +38,13 @@
# 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");
# see accompanying file Copyright.txt for details.
@@ -486,7 +490,13 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
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}
- DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION})
+ DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
+ ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
+ )
endif()
endif()