packagechooser: Adapt to Qt6
While here, deal with the WITH_ -> BUILD_ change of options.
This commit is contained in:
parent
07e7757c31
commit
d7df1a8eca
@ -20,19 +20,21 @@
|
||||
# SKIP_MODULES : a space or semicolon-separated list of directory names
|
||||
# under src/modules that should not be built.
|
||||
# USE_<foo> : fills in SKIP_MODULES for modules called <foo>-<something>.
|
||||
# WITH_QT6 : use Qt6, rather than Qt5 (default to OFF).
|
||||
# WITH_<foo> : try to enable <foo> (these usually default to ON). For
|
||||
# a list of WITH_<foo> grep CMakeCache.txt after running
|
||||
# CMake once. These affect the ABI offered by Calamares.
|
||||
# - PYTHON (enable Python Job modules)
|
||||
# - QML (enable QML UI View modules)
|
||||
# - QT6 (use Qt6 rather than Qt5, default to OFF)
|
||||
# The WITH_* options affect the ABI of Calamares: you must
|
||||
# build (C++) modules for Calamares with the same WITH_*
|
||||
# settings, or they may not load at all.
|
||||
# BUILD_<foo> : choose additional things to build
|
||||
# - TESTING (standard CMake option)
|
||||
# - SCHEMA_TESTING (requires Python, see ci/configvalidator.py)
|
||||
# - APPDATA (use AppData in packagechooser, requires QtXml)
|
||||
# - APPSTREAM (use AppStream in packagechooser, requires libappstream-qt)
|
||||
# - BUILD_CRASH_REPORTING (uses KCrash, rather than Calamares internal, for crash reporting)
|
||||
# - SCHEMA_TESTING (requires Python, see ci/configvalidator.py)
|
||||
# - TESTING (standard CMake option)
|
||||
# DEBUG_<foo> : special developer flags for debugging.
|
||||
#
|
||||
# Example usage:
|
||||
|
@ -3,20 +3,19 @@
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
|
||||
find_package(${qtname} COMPONENTS Core Gui Widgets REQUIRED)
|
||||
set(_extra_libraries "")
|
||||
set(_extra_src "")
|
||||
|
||||
### OPTIONAL AppData XML support in PackageModel
|
||||
#
|
||||
#
|
||||
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
||||
option(WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
if(WITH_APPDATA)
|
||||
find_package(Qt5 COMPONENTS Xml)
|
||||
if(Qt5Xml_FOUND)
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
if(BUILD_APPDATA)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries Qt5::Xml)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
list(APPEND _extra_src ItemAppData.cpp)
|
||||
endif()
|
||||
endif()
|
||||
@ -24,8 +23,8 @@ endif()
|
||||
### OPTIONAL AppStream support in PackageModel
|
||||
#
|
||||
#
|
||||
option(WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(WITH_APPSTREAM)
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(BUILD_APPSTREAM)
|
||||
find_package(AppStreamQt)
|
||||
set_package_properties(
|
||||
AppStreamQt
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
#include "compat/Variant.h"
|
||||
#include "packages/Globals.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Variant.h"
|
||||
@ -175,7 +176,7 @@ Config::updateGlobalStorage( const QStringList& selected ) const
|
||||
if ( gs->contains( "netinstallSelect" ) )
|
||||
{
|
||||
auto selectedOrig = gs->value( "netinstallSelect" );
|
||||
if ( selectedOrig.canConvert( QVariant::StringList ) )
|
||||
if ( selectedOrig.canConvert< QStringList >() )
|
||||
{
|
||||
newSelected += selectedOrig.toStringList();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ if(NOT WITH_QML)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(Qt5 ${QT_VERSION} CONFIG REQUIRED Core)
|
||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
||||
|
||||
# Add optional libraries here
|
||||
set(USER_EXTRA_LIB)
|
||||
@ -21,13 +21,12 @@ include_directories(${_packagechooser})
|
||||
### OPTIONAL AppData XML support in PackageModel
|
||||
#
|
||||
#
|
||||
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
||||
option(WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
if(WITH_APPDATA)
|
||||
find_package(Qt5 COMPONENTS Xml)
|
||||
if(Qt5Xml_FOUND)
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
if(BUILD_APPDATA)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries Qt5::Xml)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
list(APPEND _extra_src ${_packagechooser}/ItemAppData.cpp)
|
||||
endif()
|
||||
endif()
|
||||
@ -35,8 +34,8 @@ endif()
|
||||
### OPTIONAL AppStream support in PackageModel
|
||||
#
|
||||
#
|
||||
option(WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(WITH_APPSTREAM)
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(BUILD_APPSTREAM)
|
||||
find_package(AppStreamQt)
|
||||
set_package_properties(
|
||||
AppStreamQt
|
||||
|
Loading…
Reference in New Issue
Block a user