summaryrefslogtreecommitdiff
path: root/Source/QtDialog/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-19 16:40:22 -0500
committerBrad King <brad.king@kitware.com>2013-11-21 11:04:24 -0500
commit8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe (patch)
tree0926271b4a6c01051c6ed9e5e2667db0f86c7db1 /Source/QtDialog/CMakeLists.txt
parent6fc4ab9b28054a0d2f6c5fc63ddd860eeed1ac64 (diff)
downloadcmake-8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe.tar.gz
cmake-gui: Reference LGPLv2.1 when redistributing Qt
Download http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and place it as Licenses/LGPLv2.1.txt in our source tree. When building cmake-gui, use option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification in the "About" dialog of how the distribution of Qt is licensed. Install the license file as ${CMAKE_ROOT}/Licenses/LGPLv2.1.txt so that the dialog can display a path to it.
Diffstat (limited to 'Source/QtDialog/CMakeLists.txt')
-rw-r--r--Source/QtDialog/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index f1f4649e88..4308a4d6fd 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -102,6 +102,13 @@ if(APPLE)
MACOSX_PACKAGE_LOCATION Resources)
endif()
+if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
+ install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt
+ DESTINATION ${CMAKE_DATA_DIR}/Licenses)
+ set_property(SOURCE CMakeSetupDialog.cxx
+ PROPERTY COMPILE_DEFINITIONS CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
+endif()
+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})