Skip to content

Commit

Permalink
CMake: optional show LGPLv2.1 license when install cmake-gui component
Browse files Browse the repository at this point in the history
In IFW installer if cmake-gui component selected and
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL enabled license will be
showed.
  • Loading branch information
podsvirov authored and bradking committed Jul 7, 2015
1 parent c14f20f commit ecca268
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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)
Expand All @@ -100,6 +102,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
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
Expand Down
4 changes: 3 additions & 1 deletion CMakeCPackOptions.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ if(CPACK_GENERATOR MATCHES "IFW")
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_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)

Expand Down Expand Up @@ -115,6 +116,7 @@ if(CPACK_GENERATOR MATCHES "IFW")
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)
Expand Down

0 comments on commit ecca268

Please sign in to comment.