diff options
author | Brad King <brad.king@kitware.com> | 2013-11-19 21:40:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-21 16:04:24 (GMT) |
commit | 8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe (patch) | |
tree | 0926271b4a6c01051c6ed9e5e2667db0f86c7db1 /Source | |
parent | 6fc4ab9b28054a0d2f6c5fc63ddd860eeed1ac64 (diff) | |
download | CMake-8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe.zip CMake-8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe.tar.gz CMake-8ad8a9b1a6ecd9ae57597803afcac3bd839bd0fe.tar.bz2 |
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')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index f1f4649..4308a4d 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}) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index d482852..84763cc 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -34,6 +34,7 @@ #include "QCMakeCacheView.h" #include "AddCacheEntry.h" #include "FirstConfigure.h" +#include "cmSystemTools.h" #include "cmVersion.h" QCMakeThread::QCMakeThread(QObject* p) @@ -814,9 +815,19 @@ void CMakeSetupDialog::doAbout() "\n" "CMake GUI maintained by csimsoft,\n" "built using Qt %2 (qt-project.org).\n" +#ifdef CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL + "\n" + "The Qt Toolkit is Copyright (C) Digia Plc and/or its subsidiary(-ies).\n" + "Qt is licensed under terms of the GNU LGPLv2.1, available at:\n" + " \"%3\"" +#endif ); msg = msg.arg(cmVersion::GetCMakeVersion()); msg = msg.arg(qVersion()); +#ifdef CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL + std::string lgpl = cmSystemTools::GetCMakeRoot()+"/Licenses/LGPLv2.1.txt"; + msg = msg.arg(lgpl.c_str()); +#endif QDialog dialog; dialog.setWindowTitle(tr("About")); |