Commit 8ad8a9b1 authored by Brad King's avatar Brad King

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.
parent 6fc4ab9b
This diff is collapsed.
Licenses
========
The CMake source tree is distributed under terms of the BSD 3-Clause license.
This directory contains other license files that need to be packaged with
binary distributions when certain third-party libraries are included.
......@@ -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})
......
......@@ -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"));
......
......@@ -13,6 +13,7 @@ CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
BUILD_QtDialog:BOOL:=TRUE
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe
")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
......
......@@ -16,6 +16,7 @@ OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1c-install/lib/libssl.a
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
CPACK_SYSTEM_NAME:STRING=Darwin-universal
BUILD_QtDialog:BOOL=TRUE
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake
")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
......
......@@ -18,6 +18,7 @@ CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
CPACK_SYSTEM_NAME:STRING=Darwin64-universal
BUILD_QtDialog:BOOL=TRUE
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake
")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
......
......@@ -16,6 +16,7 @@ OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.1c-install/include
OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.1c-install/lib/libssl.a
CPACK_SYSTEM_NAME:STRING=Linux-i386
BUILD_QtDialog:BOOL:=TRUE
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/home/kitware/qt-4.43-install/bin/qmake
")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment