summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-28 15:36:54 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-28 15:36:54 (GMT)
commit832f0a88f042d16b4afb049968ae1c167109d6a0 (patch)
tree9f14a5eed0c52a4a3af9f5ade60e644fdc71c0bc /Source/kwsys/CMakeLists.txt
parent9737ea074a5e199f5785f9f242c5ec80394b229f (diff)
downloadCMake-832f0a88f042d16b4afb049968ae1c167109d6a0.zip
CMake-832f0a88f042d16b4afb049968ae1c167109d6a0.tar.gz
CMake-832f0a88f042d16b4afb049968ae1c167109d6a0.tar.bz2
Install KWSys Copyright.txt as documentation
This commit adds KWSys configuration option KWSYS_INSTALL_DOC_DIR to specify the directory for installation of documentation. We use it to put the KWSys Copyright.txt file at the location ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}/Copyright.txt in the project installation tree. This helps containing projects meet the license requirement to distribute the copyright and license with binary forms.
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 34df847..475abe6 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -55,6 +55,8 @@
# KWSYS_INSTALL_INCLUDE_DIR kwsys should be installed by a "make install".
# The values should be specified relative to
# the installation prefix and NOT start with '/'.
+# KWSYS_INSTALL_DOC_DIR = The installation target directory for documentation
+# such as copyright information.
#
# KWSYS_INSTALL_COMPONENT_NAME_RUNTIME = Name of runtime and development
# KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT installation components.
@@ -574,6 +576,22 @@ SET(KWSYS_HEADER_DIR "${KWSYS_HEADER_ROOT}/${KWSYS_NAMESPACE}")
INCLUDE_DIRECTORIES(${KWSYS_HEADER_ROOT})
#-----------------------------------------------------------------------------
+IF(KWSYS_INSTALL_DOC_DIR)
+ # Assign the license to the runtime component since it must be
+ # distributed with binary forms of this software.
+ IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
+ SET(KWSYS_INSTALL_LICENSE_OPTIONS ${KWSYS_INSTALL_LICENSE_OPTIONS}
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
+ )
+ ENDIF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
+
+ # Install the license under the documentation directory.
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt
+ DESTINATION ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}
+ ${KWSYS_INSTALL_LICENSE_OPTIONS})
+ENDIF(KWSYS_INSTALL_DOC_DIR)
+
+#-----------------------------------------------------------------------------
# Create STL header wrappers to block warnings in the STL headers and
# give standard names by which they may be included.
SET(KWSYS_STL_HEADER_EXTRA_string 1)