Merge topic 'cmake-install-components'

9ce7a663 Utilities/Sphinx: Add CMake_OPTIONAL_COMPONENT macro
d7725a17 CMake: Add cmakexbuild component as REQUIRED to Tools group for IFW installer
ecca2685 CMake: optional show LGPLv2.1 license when install cmake-gui component
c14f20f7 CMake: Fix Web Site shortcut in IFW installer for Windows
c823f04e CMake: New option CMake_INSTALL_COMPONENTS
7383e4d7 CMake: Install COMPONENTs (sphinx-man)
2531b909 CMake: Install COMPONENTs (QtDialog)
938bbc43 CMake: Install COMPONENTs
This commit is contained in:
Brad King 2015-07-08 09:19:12 -04:00 committed by CMake Topic Stage
commit 66e0681ea0
11 changed files with 302 additions and 24 deletions

View File

@ -65,6 +65,61 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()
endif()
# Components
if(CMake_INSTALL_COMPONENTS)
set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
if(APPLE)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild)
endif()
if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME)
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
else()
set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME Unspecified)
endif()
list(APPEND _CPACK_IFW_COMPONENTS_ALL ${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME})
string(TOUPPER "${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}"
_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME)
if(BUILD_CursesDialog)
list(APPEND _CPACK_IFW_COMPONENTS_ALL ccmake)
endif()
if(BUILD_QtDialog)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui)
set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES
\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\")")
endif()
if(SPHINX_MAN)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man)
endif()
if(SPHINX_HTML)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-html)
endif()
if(SPHINX_SINGLEHTML)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-singlehtml)
endif()
if(SPHINX_QTHELP)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
endif()
set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
# Components
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
set(CPACK_COMPONENTS_GROUPING IGNORE)
")
else()
if(BUILD_QtDialog AND CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
set(_CPACK_IFW_ADDITIONAL_LICENSES
"\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\"")
endif()
endif()
# Components scripts configuration
foreach(_script
CMake
CMake.Documentation.SphinxHTML)
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
"${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
endforeach()
if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
set(_CPACK_IFW_PACKAGE_ICON
"set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")")
@ -78,9 +133,13 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
"${CMake_BINARY_DIR}/installscript.qs" @ONLY
)
install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html"
DESTINATION "."
DESTINATION "${CMAKE_DOC_DIR}"
)
set(_CPACK_IFW_PACKAGE_SCRIPT "set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT \"${CMake_BINARY_DIR}/installscript.qs\")")
if(CMake_INSTALL_COMPONENTS)
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/CMake.qs")
else()
set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/installscript.qs")
endif()
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)

View File

@ -32,6 +32,7 @@ endif()
include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
if(CPACK_GENERATOR MATCHES "IFW")
# Installer configuration
set(CPACK_IFW_PACKAGE_TITLE "CMake Build Tool")
set(CPACK_IFW_PRODUCT_URL "http://www.cmake.org")
@ -40,21 +41,132 @@ if(CPACK_GENERATOR MATCHES "IFW")
"@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png")
set(CPACK_IFW_PACKAGE_CONTROL_SCRIPT
"@CMake_SOURCE_DIR@/Source/QtIFW/controlscript.qs")
# Uninstaller configuration
set(CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME "cmake-maintenance")
@_CPACK_IFW_COMPONENTS_CONFIGURATION@
# Unspecified
set(CPACK_IFW_COMPONENT_@_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME@_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@")
# Package configuration group
set(CPACK_IFW_PACKAGE_GROUP CMake)
# Group configuration
# CMake
set(CPACK_COMPONENT_GROUP_CMAKE_DISPLAY_NAME
"@CPACK_PACKAGE_NAME@")
set(CPACK_COMPONENT_GROUP_CMAKE_DESCRIPTION
"@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
# IFW group configuration
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES
"@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@")
@_CPACK_IFW_PACKAGE_SCRIPT@
"@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@"
@_CPACK_IFW_ADDITIONAL_LICENSES@)
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT "@_CPACK_IFW_PACKAGE_SCRIPT@")
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_PRIORITY 100)
# Tools
set(CPACK_COMPONENT_GROUP_TOOLS_DISPLAY_NAME "Command-Line Tools")
set(CPACK_COMPONENT_GROUP_TOOLS_DESCRIPTION
"Command-Line Tools: cmake, ctest and cpack")
set(CPACK_COMPONENT_GROUP_TOOLS_PARENT_GROUP CMake)
set(CPACK_IFW_COMPONENT_GROUP_TOOLS_PRIORITY 90)
set(CPACK_IFW_COMPONENT_GROUP_TOOLS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKE_DISPLAY_NAME "cmake")
set(CPACK_COMPONENT_CMAKE_DESCRIPTION
"The \"cmake\" executable is the CMake command-line interface")
set(CPACK_COMPONENT_CMAKE_REQUIRED TRUE)
set(CPACK_COMPONENT_CMAKE_GROUP Tools)
set(CPACK_IFW_COMPONENT_CMAKE_NAME "CMake")
set(CPACK_IFW_COMPONENT_CMAKE_PRIORITY 89)
set(CPACK_IFW_COMPONENT_CMAKE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CTEST_DISPLAY_NAME "ctest")
set(CPACK_COMPONENT_CTEST_DESCRIPTION
"The \"ctest\" executable is the CMake test driver program")
set(CPACK_COMPONENT_CTEST_REQUIRED TRUE)
set(CPACK_COMPONENT_CTEST_GROUP Tools)
set(CPACK_IFW_COMPONENT_CTEST_NAME "CTest")
set(CPACK_IFW_COMPONENT_CTEST_PRIORITY 88)
set(CPACK_IFW_COMPONENT_CTEST_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CPACK_DISPLAY_NAME "cpack")
set(CPACK_COMPONENT_CPACK_DESCRIPTION
"The \"cpack\" executable is the CMake packaging program")
set(CPACK_COMPONENT_CPACK_REQUIRED TRUE)
set(CPACK_COMPONENT_CPACK_GROUP Tools)
set(CPACK_IFW_COMPONENT_CPACK_NAME "CPack")
set(CPACK_IFW_COMPONENT_CPACK_PRIORITY 87)
set(CPACK_IFW_COMPONENT_CPACK_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKEXBUILD_DISPLAY_NAME "cmakexbuild")
set(CPACK_COMPONENT_CMAKEXBUILD_DESCRIPTION
"The \"cmakexbuild\" executable is a wrapper program for \"xcodebuild\"")
set(CPACK_COMPONENT_CMAKEXBUILD_REQUIRED TRUE)
set(CPACK_COMPONENT_CMAKEXBUILD_GROUP Tools)
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_NAME "CMakeXBuild")
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 86)
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
# Dialogs
set(CPACK_COMPONENT_GROUP_DIALOGS_DISPLAY_NAME "Interactive Dialogs")
set(CPACK_COMPONENT_GROUP_DIALOGS_DESCRIPTION
"Interactive Dialogs with Console and GUI interfaces")
set(CPACK_COMPONENT_GROUP_DIALOGS_PARENT_GROUP CMake)
set(CPACK_IFW_COMPONENT_GROUP_DIALOGS_PRIORITY 80)
set(CPACK_IFW_COMPONENT_GROUP_DIALOGS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKE-GUI_DISPLAY_NAME "cmake-gui")
set(CPACK_COMPONENT_CMAKE-GUI_GROUP Dialogs)
set(CPACK_IFW_COMPONENT_CMAKE-GUI_NAME "QtGUI")
set(CPACK_IFW_COMPONENT_CMAKE-GUI_SCRIPT
"@CMake_SOURCE_DIR@/Source/QtIFW/CMake.Dialogs.QtGUI.qs")
set(CPACK_IFW_COMPONENT_CMAKE-GUI_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
@_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES@
set(CPACK_COMPONENT_CCMAKE_DISPLAY_NAME "ccmake")
set(CPACK_COMPONENT_CCMAKE_GROUP Dialogs)
set(CPACK_IFW_COMPONENT_CCMAKE_NAME "CursesGUI")
set(CPACK_IFW_COMPONENT_CCMAKE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
# Documentation
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_DISPLAY_NAME "Documentation")
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
"CMake Documentation in different formats (html, man, qch)")
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_PARENT_GROUP CMake)
set(CPACK_IFW_COMPONENT_GROUP_DOCUMENTATION_PRIORITY 60)
set(CPACK_IFW_COMPONENT_GROUP_DOCUMENTATION_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_SPHINX-MAN_DISPLAY_NAME "man")
set(CPACK_COMPONENT_SPHINX-MAN_GROUP Documentation)
set(CPACK_COMPONENT_SPHINX-MAN_DISABLED TRUE)
set(CPACK_IFW_COMPONENT_SPHINX-MAN_NAME "SphinxMan")
set(CPACK_IFW_COMPONENT_SPHINX-MAN_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_SPHINX-HTML_DISPLAY_NAME "HTML")
set(CPACK_COMPONENT_SPHINX-HTML_GROUP Documentation)
set(CPACK_IFW_COMPONENT_SPHINX-HTML_NAME "SphinxHTML")
set(CPACK_IFW_COMPONENT_SPHINX-HTML_SCRIPT
"@CMake_BINARY_DIR@/CMake.Documentation.SphinxHTML.qs")
set(CPACK_IFW_COMPONENT_SPHINX-HTML_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_DISPLAY_NAME "Single HTML")
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_GROUP Documentation)
set(CPACK_COMPONENT_SPHINX-SINGLEHTML_DISABLED TRUE)
set(CPACK_IFW_COMPONENT_SPHINX-SINGLEHTML_NAME "SphinxSingleHTML")
set(CPACK_IFW_COMPONENT_SPHINX-SINGLEHTML_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_SPHINX-QTHELP_DISPLAY_NAME "Qt Compressed Help")
set(CPACK_COMPONENT_SPHINX-QTHELP_GROUP Documentation)
set(CPACK_COMPONENT_SPHINX-QTHELP_DISABLED TRUE)
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
endif()
if(CPACK_GENERATOR MATCHES "CygwinSource")

View File

@ -59,6 +59,17 @@ if(CMAKE_ENCODING_UTF8)
set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
endif()
# option to use COMPONENT with install command
option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF)
mark_as_advanced(CMake_INSTALL_COMPONENTS)
macro(CMake_OPTIONAL_COMPONENT NAME)
if(CMake_INSTALL_COMPONENTS)
set(COMPONENT COMPONENT ${NAME})
else()
set(COMPONENT)
endif()
endmacro()
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro
# simply to improve readability of the main script

View File

@ -735,9 +735,17 @@ endif()
include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
install(TARGETS cmake ctest cpack DESTINATION bin)
# Install tools
set(_tools cmake ctest cpack)
if(APPLE)
install(TARGETS cmakexbuild DESTINATION bin)
list(APPEND _tools cmakexbuild)
endif()
foreach(_tool ${_tools})
CMake_OPTIONAL_COMPONENT(${_tool})
install(TARGETS ${_tool} DESTINATION bin ${COMPONENT})
endforeach()
install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)

View File

@ -47,4 +47,5 @@ else()
target_link_libraries(ccmake cmForm)
endif()
install(TARGETS ccmake DESTINATION bin)
CMake_OPTIONAL_COMPONENT(ccmake)
install(TARGETS ccmake DESTINATION bin ${COMPONENT})

View File

@ -14,6 +14,7 @@ project(QtDialog)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
endif()
CMake_OPTIONAL_COMPONENT(cmake-gui)
find_package(Qt5Widgets QUIET)
if (Qt5Widgets_FOUND)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
@ -47,7 +48,8 @@ if (Qt5Widgets_FOUND)
get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
set(_qt_plugin_dest "PlugIns/${_qt_plugin_type}")
install(FILES "${_qt_plugin_path}"
DESTINATION "${_qt_plugin_dest}")
DESTINATION "${_qt_plugin_dest}"
${COMPONENT})
set(${_qt_plugins_var}
"${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
else()
@ -58,7 +60,8 @@ if (Qt5Widgets_FOUND)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = PlugIns\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources")
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
${COMPONENT})
endif()
if(WIN32 AND TARGET Qt5::Core)
@ -130,7 +133,8 @@ endif()
if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt
DESTINATION ${CMAKE_DATA_DIR}/Licenses)
DESTINATION ${CMAKE_DATA_DIR}/Licenses
${COMPONENT})
set_property(SOURCE CMakeSetupDialog.cxx
PROPERTY COMPILE_DEFINITIONS CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
endif()
@ -163,27 +167,36 @@ if(APPLE)
)
endif()
set(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" ${COMPONENT})
install(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS})
install(TARGETS cmake-gui
RUNTIME DESTINATION bin ${COMPONENT}
${CMAKE_INSTALL_DESTINATION_ARGS})
if(UNIX AND NOT APPLE)
foreach (size IN ITEMS 32 128)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png"
DESTINATION "share/icons/hicolor/${size}x${size}/apps"
${COMPONENT}
RENAME "CMakeSetup.png")
endforeach ()
# install a desktop file so CMake appears in the application start menu
# with an icon
install(FILES CMake.desktop DESTINATION share/applications )
install(FILES cmakecache.xml DESTINATION share/mime/packages )
install(FILES CMake.desktop
DESTINATION share/applications
${COMPONENT})
install(FILES cmakecache.xml
DESTINATION share/mime/packages
${COMPONENT})
endif()
if(APPLE)
install(CODE "execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
install(CODE "
execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)
" ${COMPONENT})
endif()
if(APPLE OR WIN32)
@ -197,7 +210,7 @@ if(APPLE OR WIN32)
include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
")
" ${COMPONENT})
endif()
set(CMAKE_PACKAGE_QTGUI TRUE)

View File

@ -0,0 +1,21 @@
// Component: CMake.Dialogs.QtGUI
function Component()
{
// Default constructor
}
Component.prototype.createOperations = function()
{
// Create shortcut
if (installer.value("os") === "win") {
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/bin/cmake-gui.exe",
installer.value("StartMenuDir") + "/CMake (cmake-gui).lnk");
}
// Call default implementation
component.createOperations();
}

View File

@ -0,0 +1,21 @@
// Component: CMake.Documentation.SphinxHTML
function Component()
{
// Default constructor
}
Component.prototype.createOperations = function()
{
// Create shortcut
if (installer.value("os") === "win") {
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/@CMAKE_DOC_DIR@/html/index.html",
installer.value("StartMenuDir") + "/CMake Documentation.lnk");
}
// Call default implementation
component.createOperations();
}

22
Source/QtIFW/CMake.qs.in Normal file
View File

@ -0,0 +1,22 @@
function Component()
{
// Default constructor
}
Component.prototype.createOperations = function()
{
// Create shortcut
if (installer.value("os") === "win") {
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/@CMAKE_DOC_DIR@/cmake.org.html",
installer.value("StartMenuDir") + "/CMake Web Site.lnk");
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/cmake-maintenance.exe",
installer.value("StartMenuDir") + "/CMake Maintenance Tool.lnk");
}
// Call default implementation
component.createOperations();
}

View File

@ -5,20 +5,20 @@ function Component()
Component.prototype.createOperations = function()
{
// call default implementation to actually install applications!
component.createOperations();
// Create shortcut
if (installer.value("os") === "win") {
@_CPACK_IFW_SHORTCUT_OPTIONAL@
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/cmake.org.html",
installer.value("TargetDir") + "/@CMAKE_DOC_DIR@/cmake.org.html",
installer.value("StartMenuDir") + "/CMake Web Site.lnk");
component.addOperation("CreateShortcut",
installer.value("TargetDir") + "/cmake-maintenance.exe",
installer.value("StartMenuDir") + "/CMake Maintenance Tool.lnk");
}
// Call default implementation
component.createOperations();
}

View File

@ -19,6 +19,9 @@ if(NOT CMake_SOURCE_DIR)
include(${CMake_SOURCE_DIR}/Source/CMakeInstallDestinations.cmake)
unset(CMAKE_DATA_DIR)
unset(CMAKE_DATA_DIR CACHE)
macro(CMake_OPTIONAL_COMPONENT)
set(COMPONENT "")
endmacro()
endif()
project(CMakeHelp NONE)
@ -153,28 +156,35 @@ if(SPHINX_MAN)
if("x${m}" MATCHES "^x(.+)\\.([1-9])\\.rst$")
set(name "${CMAKE_MATCH_1}")
set(sec "${CMAKE_MATCH_2}")
CMake_OPTIONAL_COMPONENT(sphinx-man)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec}
DESTINATION ${CMAKE_MAN_DIR}/man${sec})
DESTINATION ${CMAKE_MAN_DIR}/man${sec}
${COMPONENT})
endif()
endforeach()
endif()
if(SPHINX_HTML)
CMake_OPTIONAL_COMPONENT(sphinx-html)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${CMAKE_DOC_DIR}
${COMPONENT}
PATTERN .buildinfo EXCLUDE
)
endif()
if(SPHINX_SINGLEHTML)
CMake_OPTIONAL_COMPONENT(sphinx-singlehtml)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/singlehtml
DESTINATION ${CMAKE_DOC_DIR}
${COMPONENT}
PATTERN .buildinfo EXCLUDE
)
endif()
if(SPHINX_QTHELP)
CMake_OPTIONAL_COMPONENT(sphinx-qthelp)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake-${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}${CMake_VERSION_PATCH}.qch
DESTINATION ${CMAKE_DOC_DIR}
DESTINATION ${CMAKE_DOC_DIR} ${COMPONENT}
)
endif()