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.
This commit is contained in:
parent
9737ea074a
commit
832f0a88f0
|
@ -170,6 +170,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
SET(KWSYS_USE_Process 1)
|
||||
SET(KWSYS_USE_CommandLineArguments 1)
|
||||
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
|
||||
SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
|
||||
SUBDIRS(Source/kwsys)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -340,6 +341,7 @@ SET(CMAKE_MAN_DIR "/man" CACHE STRING
|
|||
"Install location for man pages (relative to prefix).")
|
||||
MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
|
||||
STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}")
|
||||
STRING(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}")
|
||||
|
||||
# include special compile flags for some compilers
|
||||
INCLUDE(CompileFlags.cmake)
|
||||
|
|
|
@ -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.
|
||||
|
@ -573,6 +575,22 @@ ENDIF(NOT KWSYS_HEADER_ROOT)
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue