diff options
author | Luca Weiss <luca@z3ntu.xyz> | 2020-12-08 22:37:05 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-07 22:43:00 +0200 |
commit | 398df5629863e913fa603cbf02c525a9f501f8a8 (patch) | |
tree | 4ca64a52c67ef6d79ee0ee609ff23c6218551fed /mesonbuild | |
parent | a855bcab1ccaff68155374c53896c1a780337f40 (diff) | |
download | meson-398df5629863e913fa603cbf02c525a9f501f8a8.zip meson-398df5629863e913fa603cbf02c525a9f501f8a8.tar.gz meson-398df5629863e913fa603cbf02c525a9f501f8a8.tar.bz2 |
Add Qt6 module
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/__init__.py | 3 | ||||
-rw-r--r-- | mesonbuild/dependencies/ui.py | 11 | ||||
-rw-r--r-- | mesonbuild/modules/qt.py | 5 | ||||
-rw-r--r-- | mesonbuild/modules/qt6.py | 25 |
4 files changed, 41 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/__init__.py b/mesonbuild/dependencies/__init__.py index 7110c1f..44105f2 100644 --- a/mesonbuild/dependencies/__init__.py +++ b/mesonbuild/dependencies/__init__.py @@ -30,7 +30,7 @@ from .misc import ( shaderc_factory, threads_factory, ) from .platform import AppleFrameworks -from .ui import GnuStepDependency, Qt4Dependency, Qt5Dependency, WxDependency, gl_factory, sdl2_factory, vulkan_factory +from .ui import GnuStepDependency, Qt4Dependency, Qt5Dependency, Qt6Dependency, WxDependency, gl_factory, sdl2_factory, vulkan_factory # This is a dict where the keys should be strings, and the values must be one @@ -77,6 +77,7 @@ packages.update({ 'gnustep': GnuStepDependency, 'qt4': Qt4Dependency, 'qt5': Qt5Dependency, + 'qt6': Qt6Dependency, 'sdl2': sdl2_factory, 'wxwidgets': WxDependency, 'vulkan': vulkan_factory, diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 0b0d96d..d897d76 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -544,6 +544,17 @@ class Qt5Dependency(QtBaseDependency): return _qt_get_private_includes(mod_inc_dir, module, self.version) +class Qt6Dependency(QtBaseDependency): + def __init__(self, env, kwargs): + QtBaseDependency.__init__(self, 'qt6', env, kwargs) + + def get_pkgconfig_host_bins(self, core): + return core.get_pkgconfig_variable('host_bins', {}) + + def get_private_includes(self, mod_inc_dir, module): + return _qt_get_private_includes(mod_inc_dir, module, self.version) + + class SDL2DependencyConfigTool(ConfigToolDependency): tools = ['sdl2-config'] diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index 00c7c7a..680ee72 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -17,7 +17,7 @@ import shutil from .. import mlog from .. import build from ..mesonlib import MesonException, extract_as_list, File, unholder, version_compare -from ..dependencies import Dependency, Qt4Dependency, Qt5Dependency, NonExistingExternalProgram +from ..dependencies import Dependency, Qt4Dependency, Qt5Dependency, Qt6Dependency, NonExistingExternalProgram import xml.etree.ElementTree as ET from . import ModuleReturnValue, get_include_args, ExtensionModule from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew, FeatureNewKwargs @@ -25,7 +25,8 @@ from ..interpreter import extract_required_kwarg _QT_DEPS_LUT = { 4: Qt4Dependency, - 5: Qt5Dependency + 5: Qt5Dependency, + 6: Qt6Dependency, } diff --git a/mesonbuild/modules/qt6.py b/mesonbuild/modules/qt6.py new file mode 100644 index 0000000..d9cd651 --- /dev/null +++ b/mesonbuild/modules/qt6.py @@ -0,0 +1,25 @@ +# Copyright 2020 The Meson development team + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from .qt import QtBaseModule + + +class Qt6Module(QtBaseModule): + + def __init__(self, interpreter): + QtBaseModule.__init__(self, interpreter, qt_version=6) + + +def initialize(*args, **kwargs): + return Qt6Module(*args, **kwargs) |