CMake: Install COMPONENTs
Added components: - cmake - ctest - cpack - cmake-gui - ccmake - data - sphinx-html - sphinx-singlehtml - sphinx-qthelp Other now Unspecified.
This commit is contained in:
parent
fd23fc5711
commit
938bbc4352
|
@ -65,22 +65,48 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Components
|
||||
set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
|
||||
list(APPEND _CPACK_IFW_COMPONENTS_ALL data)
|
||||
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)
|
||||
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()
|
||||
|
||||
# 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\")")
|
||||
if(BUILD_QtDialog)
|
||||
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/bin/cmake-gui.exe\", \"@StartMenuDir@/CMake (cmake-gui).lnk\");\n")
|
||||
endif()
|
||||
if(SPHINX_HTML)
|
||||
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n")
|
||||
endif()
|
||||
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in"
|
||||
"${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\")")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
||||
|
|
|
@ -44,17 +44,97 @@ if(CPACK_GENERATOR MATCHES "IFW")
|
|||
set(CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME "cmake-maintenance")
|
||||
# Package configuration group
|
||||
set(CPACK_IFW_PACKAGE_GROUP CMake)
|
||||
# Components
|
||||
set(CPACK_COMPONENTS_ALL "@_CPACK_IFW_COMPONENTS_ALL@")
|
||||
set(CPACK_COMPONENTS_GROUPING IGNORE)
|
||||
# Unspecified
|
||||
set(CPACK_IFW_COMPONENT_@_CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME@_VERSION
|
||||
"@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
# Group configuration
|
||||
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@
|
||||
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT "@CMake_BINARY_DIR@/CMake.qs")
|
||||
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_PRIORITY 100)
|
||||
|
||||
# Tools
|
||||
set(CPACK_COMPONENT_GROUP_TOOLS_DISPLAY_NAME "Command-Line Tools")
|
||||
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_GROUP Tools)
|
||||
set(CPACK_IFW_COMPONENT_CMAKE_NAME "CMake")
|
||||
set(CPACK_IFW_COMPONENT_CMAKE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
|
||||
set(CPACK_COMPONENT_CTEST_DISPLAY_NAME "ctest")
|
||||
set(CPACK_COMPONENT_CTEST_GROUP Tools)
|
||||
set(CPACK_IFW_COMPONENT_CTEST_NAME "CTest")
|
||||
set(CPACK_IFW_COMPONENT_CTEST_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
|
||||
set(CPACK_COMPONENT_CPACK_DISPLAY_NAME "cpack")
|
||||
set(CPACK_COMPONENT_CPACK_GROUP Tools)
|
||||
set(CPACK_IFW_COMPONENT_CPACK_NAME "CPack")
|
||||
set(CPACK_IFW_COMPONENT_CPACK_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
|
||||
# Dialogs
|
||||
set(CPACK_COMPONENT_GROUP_DIALOGS_DISPLAY_NAME "Interactive Dialogs")
|
||||
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@")
|
||||
|
||||
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@")
|
||||
|
||||
# Data
|
||||
set(CPACK_COMPONENT_DATA_DISPLAY_NAME "Data")
|
||||
set(CPACK_COMPONENT_DATA_DESCRIPTION
|
||||
"CMake data files (help, modules and templates)")
|
||||
set(CPACK_COMPONENT_DATA_GROUP CMake)
|
||||
set(CPACK_IFW_COMPONENT_DATA_PRIORITY 70)
|
||||
set(CPACK_IFW_COMPONENT_DATA_NAME "Data")
|
||||
set(CPACK_IFW_COMPONENT_DATA_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
|
||||
# Documentation
|
||||
set(CPACK_COMPONENT_GROUP_DOCUMENTATION_DISPLAY_NAME "Documentation")
|
||||
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-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_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_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
|
||||
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
|
||||
|
||||
endif()
|
||||
|
||||
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||
|
|
|
@ -652,6 +652,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
|||
DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
COMPONENT data
|
||||
PATTERN "*.sh*" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
|
|
|
@ -734,9 +734,16 @@ 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})
|
||||
install(TARGETS ${_tool} DESTINATION bin COMPONENT ${_tool})
|
||||
endforeach()
|
||||
|
||||
install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
|
||||
|
|
|
@ -47,4 +47,4 @@ else()
|
|||
target_link_libraries(ccmake cmForm)
|
||||
endif()
|
||||
|
||||
install(TARGETS ccmake DESTINATION bin)
|
||||
install(TARGETS ccmake DESTINATION bin COMPONENT ccmake)
|
||||
|
|
|
@ -165,7 +165,9 @@ endif()
|
|||
set(CMAKE_INSTALL_DESTINATION_ARGS
|
||||
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
|
||||
|
||||
install(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS})
|
||||
install(TARGETS cmake-gui
|
||||
RUNTIME DESTINATION bin COMPONENT cmake-gui
|
||||
${CMAKE_INSTALL_DESTINATION_ARGS})
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
foreach (size IN ITEMS 32 128)
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -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();
|
||||
}
|
|
@ -1,24 +1,22 @@
|
|||
function Component()
|
||||
{
|
||||
// default constructor
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
|
@ -162,6 +162,7 @@ endif()
|
|||
if(SPHINX_HTML)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
|
||||
DESTINATION ${CMAKE_DOC_DIR}
|
||||
COMPONENT sphinx-html
|
||||
PATTERN .buildinfo EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
@ -169,12 +170,13 @@ endif()
|
|||
if(SPHINX_SINGLEHTML)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/singlehtml
|
||||
DESTINATION ${CMAKE_DOC_DIR}
|
||||
COMPONENT sphinx-singlehtml
|
||||
PATTERN .buildinfo EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
||||
if(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 sphinx-qthelp
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue