forked from qt-creator/qt-creator
CMake: Fix build with Qt 5.14
qlitehtml links against "Qt${QT_VERSION_MAJOR}::Widgets", but Qt Creator uses find_package with "Qt5" not "QT", so "QT_VERSION_MAJOR" is not defined/empty. For Qt 5.15 that is not a problem because that defines unversioned aliases "Qt::Widgets". For Qt 5.14 we must make sure it is set though. Change-Id: Icb0a195afadae3cdb164d28f15340c0a5e156543 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -30,6 +30,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
|
||||
set(QLITEHTML_DEVEL_COMPONENT Devel)
|
||||
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
|
||||
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
|
||||
set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
|
||||
add_subdirectory(qlitehtml/src)
|
||||
endif()
|
||||
if(TARGET qlitehtml)
|
||||
|
Reference in New Issue
Block a user