summaryrefslogtreecommitdiffstats
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake76
1 files changed, 48 insertions, 28 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 0eda2bd..d7c6024 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -66,34 +66,40 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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_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)
+ if(CMake_INSTALL_COMPONENTS)
+ set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
+ 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_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)
+")
endif()
# Components scripts configuration
@@ -107,9 +113,23 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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 "${CMAKE_DOC_DIR}"
)
+ 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)