CMake: optional show LGPLv2.1 license when install cmake-gui component

In IFW installer if cmake-gui component selected and
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL enabled license will be
showed.
This commit is contained in:
Konstantin Podsvirov 2015-07-03 14:50:27 +03:00 committed by Brad King
parent c14f20f7dd
commit ecca26855a
2 changed files with 10 additions and 1 deletions

View File

@ -82,6 +82,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif() endif()
if(BUILD_QtDialog) if(BUILD_QtDialog)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui) 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() endif()
if(SPHINX_MAN) if(SPHINX_MAN)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man) list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man)
@ -100,6 +102,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\") set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
set(CPACK_COMPONENTS_GROUPING IGNORE) 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() endif()
# Components scripts configuration # Components scripts configuration

View File

@ -62,7 +62,8 @@ if(CPACK_GENERATOR MATCHES "IFW")
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION
"@_CPACK_IFW_PACKAGE_VERSION@") "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES
"@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@") "@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_SCRIPT "@_CPACK_IFW_PACKAGE_SCRIPT@")
set(CPACK_IFW_COMPONENT_GROUP_CMAKE_PRIORITY 100) set(CPACK_IFW_COMPONENT_GROUP_CMAKE_PRIORITY 100)
@ -115,6 +116,7 @@ if(CPACK_GENERATOR MATCHES "IFW")
set(CPACK_IFW_COMPONENT_CMAKE-GUI_SCRIPT set(CPACK_IFW_COMPONENT_CMAKE-GUI_SCRIPT
"@CMake_SOURCE_DIR@/Source/QtIFW/CMake.Dialogs.QtGUI.qs") "@CMake_SOURCE_DIR@/Source/QtIFW/CMake.Dialogs.QtGUI.qs")
set(CPACK_IFW_COMPONENT_CMAKE-GUI_VERSION "@_CPACK_IFW_PACKAGE_VERSION@") 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_DISPLAY_NAME "ccmake")
set(CPACK_COMPONENT_CCMAKE_GROUP Dialogs) set(CPACK_COMPONENT_CCMAKE_GROUP Dialogs)