2018-10-24 13:20:27 +00:00
|
|
|
#############################################################################
|
|
|
|
##
|
|
|
|
## Copyright (C) 2018 The Qt Company Ltd.
|
|
|
|
## Contact: https://www.qt.io/licensing/
|
|
|
|
##
|
|
|
|
## This file is part of the plugins of the Qt Toolkit.
|
|
|
|
##
|
|
|
|
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
|
|
|
## Commercial License Usage
|
|
|
|
## Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
## accordance with the commercial license agreement provided with the
|
|
|
|
## Software or, alternatively, in accordance with the terms contained in
|
|
|
|
## a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
## and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
## information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
##
|
|
|
|
## GNU General Public License Usage
|
|
|
|
## Alternatively, this file may be used under the terms of the GNU
|
|
|
|
## General Public License version 3 as published by the Free Software
|
|
|
|
## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
## included in the packaging of this file. Please review the following
|
|
|
|
## information to ensure the GNU General Public License requirements will
|
|
|
|
## be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
##
|
|
|
|
## $QT_END_LICENSE$
|
|
|
|
##
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
import re
|
2019-05-03 13:02:32 +00:00
|
|
|
import typing
|
2018-10-24 13:20:27 +00:00
|
|
|
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
|
2019-05-03 13:02:32 +00:00
|
|
|
class LibraryMapping:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
soName: str,
|
|
|
|
packageName: typing.Optional[str],
|
|
|
|
targetName: typing.Optional[str],
|
|
|
|
*,
|
|
|
|
resultVariable: typing.Optional[str] = None,
|
|
|
|
extra: typing.List[str] = [],
|
|
|
|
appendFoundSuffix: bool = True,
|
2019-09-20 09:34:16 +00:00
|
|
|
emit_if: str = "",
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
is_bundled_with_qt: bool = False,
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
) -> None:
|
2019-05-03 13:02:32 +00:00
|
|
|
self.soName = soName
|
|
|
|
self.packageName = packageName
|
|
|
|
self.resultVariable = resultVariable
|
|
|
|
self.appendFoundSuffix = appendFoundSuffix
|
|
|
|
self.extra = extra
|
|
|
|
self.targetName = targetName
|
2018-10-24 13:20:27 +00:00
|
|
|
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
# True if qt bundles the library sources as part of Qt.
|
|
|
|
self.is_bundled_with_qt = is_bundled_with_qt
|
|
|
|
|
2019-05-17 12:22:57 +00:00
|
|
|
# if emit_if is non-empty, the generated find_package call
|
|
|
|
# for a library will be surrounded by this condition.
|
|
|
|
self.emit_if = emit_if
|
|
|
|
|
2019-05-08 14:45:25 +00:00
|
|
|
def is_qt(self) -> bool:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
return self.packageName == "Qt" or self.packageName == "Qt5" or self.packageName == "Qt6"
|
|
|
|
|
2019-05-03 13:02:32 +00:00
|
|
|
|
|
|
|
_qt_library_map = [
|
|
|
|
# Qt:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"accessibility_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::AccessibilitySupport",
|
|
|
|
extra=["COMPONENTS", "AccessibilitySupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"androidextras", "Qt6", "Qt::AndroidExtras", extra=["COMPONENTS", "AndroidExtras"]
|
|
|
|
),
|
|
|
|
LibraryMapping("animation", "Qt6", "Qt::3DAnimation", extra=["COMPONENTS", "3DAnimation"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"application-lib", "Qt6", "Qt::AppManApplication", extra=["COMPONENTS", "AppManApplication"]
|
|
|
|
),
|
|
|
|
LibraryMapping("bluetooth", "Qt6", "Qt::Bluetooth", extra=["COMPONENTS", "Bluetooth"]),
|
|
|
|
LibraryMapping("bootstrap", "Qt6", "Qt::Bootstrap", extra=["COMPONENTS", "Bootstrap"]),
|
2019-05-03 13:02:32 +00:00
|
|
|
# bootstrap-dbus: Not needed in Qt6!
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("client", "Qt6", "Qt::WaylandClient", extra=["COMPONENTS", "WaylandClient"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"clipboard_support", "Qt6", "Qt::ClipboardSupport", extra=["COMPONENTS", "ClipboardSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping("coap", "Qt6", "Qt::Coap", extra=["COMPONENTS", "Coap"]),
|
|
|
|
LibraryMapping("common-lib", "Qt6", "Qt::AppManCommon", extra=["COMPONENTS", "AppManCommon"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"compositor", "Qt6", "Qt::WaylandCompositor", extra=["COMPONENTS", "WaylandCompositor"]
|
|
|
|
),
|
|
|
|
LibraryMapping("concurrent", "Qt6", "Qt::Concurrent", extra=["COMPONENTS", "Concurrent"]),
|
|
|
|
LibraryMapping("container", "Qt6", "Qt::AxContainer", extra=["COMPONENTS", "AxContainer"]),
|
|
|
|
LibraryMapping("control", "Qt6", "Qt::AxServer", extra=["COMPONENTS", "AxServer"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"core_headers", "Qt6", "Qt::WebEngineCore", extra=["COMPONENTS", "WebEngineCore"]
|
|
|
|
),
|
|
|
|
LibraryMapping("core", "Qt6", "Qt::Core", extra=["COMPONENTS", "Core"]),
|
|
|
|
LibraryMapping("coretest", "Qt6", "Qt::3DCoreTest", extra=["COMPONENTS", "3DCoreTest"]),
|
|
|
|
LibraryMapping("crypto-lib", "Qt6", "Qt::AppManCrypto", extra=["COMPONENTS", "AppManCrypto"]),
|
|
|
|
LibraryMapping("dbus", "Qt6", "Qt::DBus", extra=["COMPONENTS", "DBus"]),
|
|
|
|
LibraryMapping("designer", "Qt6", "Qt::Designer", extra=["COMPONENTS", "Designer"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"designercomponents",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::DesignerComponents",
|
|
|
|
extra=["COMPONENTS", "DesignerComponents"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"devicediscovery",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::DeviceDiscoverySupport",
|
|
|
|
extra=["COMPONENTS", "DeviceDiscoverySupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"devicediscovery_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::DeviceDiscoverySupport",
|
|
|
|
extra=["COMPONENTS", "DeviceDiscoverySupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping("edid", "Qt6", "Qt::EdidSupport", extra=["COMPONENTS", "EdidSupport"]),
|
|
|
|
LibraryMapping("edid_support", "Qt6", "Qt::EdidSupport", extra=["COMPONENTS", "EdidSupport"]),
|
|
|
|
LibraryMapping("eglconvenience", "Qt6", "Qt::EglSupport", extra=["COMPONENTS", "EglSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"eglfsdeviceintegration",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::EglFSDeviceIntegration",
|
|
|
|
extra=["COMPONENTS", "EglFSDeviceIntegration"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"eglfs_kms_support", "Qt6", "Qt::EglFsKmsSupport", extra=["COMPONENTS", "EglFsKmsSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping("egl_support", "Qt6", "Qt::EglSupport", extra=["COMPONENTS", "EglSupport"]),
|
2019-05-03 13:02:32 +00:00
|
|
|
# enginio: Not needed in Qt6!
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"eventdispatchers",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::EventDispatcherSupport",
|
|
|
|
extra=["COMPONENTS", "EventDispatcherSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"eventdispatcher_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::EventDispatcherSupport",
|
|
|
|
extra=["COMPONENTS", "EventDispatcherSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping("extras", "Qt6", "Qt::3DExtras", extra=["COMPONENTS", "3DExtras"]),
|
|
|
|
LibraryMapping("fbconvenience", "Qt6", "Qt::FbSupport", extra=["COMPONENTS", "FbSupport"]),
|
|
|
|
LibraryMapping("fb_support", "Qt6", "Qt::FbSupport", extra=["COMPONENTS", "FbSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"fontdatabase_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::FontDatabaseSupport",
|
|
|
|
extra=["COMPONENTS", "FontDatabaseSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping("gamepad", "Qt6", "Qt::Gamepad", extra=["COMPONENTS", "Gamepad"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"global", "Qt6", "Qt::Core", extra=["COMPONENTS", "Core"]
|
|
|
|
), # manually added special case
|
|
|
|
LibraryMapping("glx_support", "Qt6", "Qt::GlxSupport", extra=["COMPONENTS", "GlxSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"graphics_support", "Qt6", "Qt::GraphicsSupport", extra=["COMPONENTS", "GraphicsSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"gsttools", "Qt6", "Qt::MultimediaGstTools", extra=["COMPONENTS", "MultimediaGstTools"]
|
|
|
|
),
|
|
|
|
LibraryMapping("gui", "Qt6", "Qt::Gui", extra=["COMPONENTS", "Gui"]),
|
|
|
|
LibraryMapping("help", "Qt6", "Qt::Help", extra=["COMPONENTS", "Help"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"hunspellinputmethod",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::HunspellInputMethod",
|
|
|
|
extra=["COMPONENTS", "HunspellInputMethod"],
|
|
|
|
),
|
|
|
|
LibraryMapping("input", "Qt6", "Qt::InputSupport", extra=["COMPONENTS", "InputSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"input_support", "Qt6", "Qt::InputSupport", extra=["COMPONENTS", "InputSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"installer-lib", "Qt6", "Qt::AppManInstaller", extra=["COMPONENTS", "AppManInstaller"]
|
|
|
|
),
|
|
|
|
LibraryMapping("knx", "Qt6", "Qt::Knx", extra=["COMPONENTS", "Knx"]),
|
|
|
|
LibraryMapping("kmsconvenience", "Qt6", "Qt::KmsSupport", extra=["COMPONENTS", "KmsSupport"]),
|
|
|
|
LibraryMapping("kms_support", "Qt6", "Qt::KmsSupport", extra=["COMPONENTS", "KmsSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"launcher-lib", "Qt6", "Qt::AppManLauncher", extra=["COMPONENTS", "AppManLauncher"]
|
|
|
|
),
|
|
|
|
LibraryMapping("lib", "Qt6", "Qt::Designer", extra=["COMPONENTS", "Designer"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"linuxaccessibility_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::LinuxAccessibilitySupport",
|
|
|
|
extra=["COMPONENTS", "LinuxAccessibilitySupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping("location", "Qt6", "Qt::Location", extra=["COMPONENTS", "Location"]),
|
|
|
|
LibraryMapping("logic", "Qt6", "Qt::3DLogic", extra=["COMPONENTS", "3DLogic"]),
|
|
|
|
LibraryMapping("macextras", "Qt6", "Qt::MacExtras", extra=["COMPONENTS", "MacExtras"]),
|
|
|
|
LibraryMapping("main-lib", "Qt6", "Qt::AppManMain", extra=["COMPONENTS", "AppManMain"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"manager-lib", "Qt6", "Qt::AppManManager", extra=["COMPONENTS", "AppManManager"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"monitor-lib", "Qt6", "Qt::AppManMonitor", extra=["COMPONENTS", "AppManMonitor"]
|
|
|
|
),
|
|
|
|
LibraryMapping("mqtt", "Qt6", "Qt::Mqtt", extra=["COMPONENTS", "Mqtt"]),
|
|
|
|
LibraryMapping("multimedia", "Qt6", "Qt::Multimedia", extra=["COMPONENTS", "Multimedia"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"multimediawidgets",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::MultimediaWidgets",
|
|
|
|
extra=["COMPONENTS", "MultimediaWidgets"],
|
|
|
|
),
|
|
|
|
LibraryMapping("network", "Qt6", "Qt::Network", extra=["COMPONENTS", "Network"]),
|
|
|
|
LibraryMapping("networkauth", "Qt6", "Qt::NetworkAuth", extra=["COMPONENTS", "NetworkAuth"]),
|
|
|
|
LibraryMapping("nfc", "Qt6", "Qt::Nfc", extra=["COMPONENTS", "Nfc"]),
|
|
|
|
LibraryMapping("oauth", "Qt6", "Qt::NetworkAuth", extra=["COMPONENTS", "NetworkAuth"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"openglextensions", "Qt6", "Qt::OpenGLExtensions", extra=["COMPONENTS", "OpenGLExtensions"]
|
|
|
|
),
|
|
|
|
LibraryMapping("opengl", "Qt6", "Qt::OpenGL", extra=["COMPONENTS", "OpenGL"]),
|
2020-02-04 10:47:39 +00:00
|
|
|
LibraryMapping("openglwidgets", "Qt6", "Qt::OpenGLWidgets", extra=["COMPONENTS", "OpenGLWidgets"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"package-lib", "Qt6", "Qt::AppManPackage", extra=["COMPONENTS", "AppManPackage"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"packetprotocol", "Qt6", "Qt::PacketProtocol", extra=["COMPONENTS", "PacketProtocol"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"particles", "Qt6", "Qt::QuickParticles", extra=["COMPONENTS", "QuickParticles"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"platformcompositor",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::PlatformCompositorSupport",
|
|
|
|
extra=["COMPONENTS", "PlatformCompositorSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"platformcompositor_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::PlatformCompositorSupport",
|
|
|
|
extra=["COMPONENTS", "PlatformCompositorSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"plugin-interfaces",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::AppManPluginInterfaces",
|
|
|
|
extra=["COMPONENTS", "AppManPluginInterfaces"],
|
|
|
|
),
|
|
|
|
LibraryMapping("positioning", "Qt6", "Qt::Positioning", extra=["COMPONENTS", "Positioning"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"positioningquick", "Qt6", "Qt::PositioningQuick", extra=["COMPONENTS", "PositioningQuick"]
|
|
|
|
),
|
|
|
|
LibraryMapping("printsupport", "Qt6", "Qt::PrintSupport", extra=["COMPONENTS", "PrintSupport"]),
|
|
|
|
LibraryMapping("purchasing", "Qt6", "Qt::Purchasing", extra=["COMPONENTS", "Purchasing"]),
|
|
|
|
LibraryMapping("qmldebug", "Qt6", "Qt::QmlDebug", extra=["COMPONENTS", "QmlDebug"]),
|
|
|
|
LibraryMapping("qmldevtools", "Qt6", "Qt::QmlDevTools", extra=["COMPONENTS", "QmlDevTools"]),
|
|
|
|
LibraryMapping("qml", "Qt6", "Qt::Qml", extra=["COMPONENTS", "Qml"]),
|
|
|
|
LibraryMapping("qmlmodels", "Qt6", "Qt::QmlModels", extra=["COMPONENTS", "QmlModels"]),
|
|
|
|
LibraryMapping("qmltest", "Qt6", "Qt::QuickTest", extra=["COMPONENTS", "QuickTest"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"qtmultimediaquicktools",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::MultimediaQuick",
|
|
|
|
extra=["COMPONENTS", "MultimediaQuick"],
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
2019-11-25 08:37:45 +00:00
|
|
|
"quick3dassetimport",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::Quick3DAssetImport",
|
|
|
|
extra=["COMPONENTS", "Quick3DAssetImport"],
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
),
|
2019-11-22 16:05:29 +00:00
|
|
|
LibraryMapping("quick3d", "Qt6", "Qt::Quick3D", extra=["COMPONENTS", "Quick3D"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping(
|
2019-11-22 16:05:29 +00:00
|
|
|
"quick3drender", "Qt6", "Qt::Quick3DRender", extra=["COMPONENTS", "Quick3DRender"]
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
),
|
|
|
|
LibraryMapping(
|
2019-11-25 08:37:45 +00:00
|
|
|
"quick3druntimerender",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::Quick3DRuntimeRender",
|
|
|
|
extra=["COMPONENTS", "Quick3DRuntimeRender"],
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
),
|
2019-11-25 08:37:45 +00:00
|
|
|
LibraryMapping("quick3dutils", "Qt6", "Qt::Quick3DUtils", extra=["COMPONENTS", "Quick3DUtils"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"quickcontrols2", "Qt6", "Qt::QuickControls2", extra=["COMPONENTS", "QuickControls2"]
|
|
|
|
),
|
|
|
|
LibraryMapping("quick", "Qt6", "Qt::Quick", extra=["COMPONENTS", "Quick"]),
|
|
|
|
LibraryMapping("quickshapes", "Qt6", "Qt::QuickShapes", extra=["COMPONENTS", "QuickShapes"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"quicktemplates2", "Qt6", "Qt::QuickTemplates2", extra=["COMPONENTS", "QuickTemplates2"]
|
|
|
|
),
|
|
|
|
LibraryMapping("quickwidgets", "Qt6", "Qt::QuickWidgets", extra=["COMPONENTS", "QuickWidgets"]),
|
|
|
|
LibraryMapping("render", "Qt6", "Qt::3DRender", extra=["COMPONENTS", "3DRender"]),
|
2019-10-10 15:15:58 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"remoteobjects", "Qt6", "Qt::RemoteObjects", extra=["COMPONENTS", "RemoteObjects"]
|
|
|
|
),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("script", "Qt6", "Qt::Script", extra=["COMPONENTS", "Script"]),
|
|
|
|
LibraryMapping("scripttools", "Qt6", "Qt::ScriptTools", extra=["COMPONENTS", "ScriptTools"]),
|
2019-09-19 09:04:16 +00:00
|
|
|
LibraryMapping("scxml", "Qt6", "Qt::Scxml", extra=["COMPONENTS", "Scxml"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("sensors", "Qt6", "Qt::Sensors", extra=["COMPONENTS", "Sensors"]),
|
|
|
|
LibraryMapping("serialport", "Qt6", "Qt::SerialPort", extra=["COMPONENTS", "SerialPort"]),
|
|
|
|
LibraryMapping("serialbus", "Qt6", "Qt::SerialBus", extra=["COMPONENTS", "SerialBus"]),
|
|
|
|
LibraryMapping("services", "Qt6", "Qt::ServiceSupport", extra=["COMPONENTS", "ServiceSupport"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"service_support", "Qt6", "Qt::ServiceSupport", extra=["COMPONENTS", "ServiceSupport"]
|
|
|
|
),
|
2020-02-07 11:55:09 +00:00
|
|
|
LibraryMapping("shadertools", "Qt6", "Qt::ShaderTools", extra=["COMPONENTS", "ShaderTools"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("sql", "Qt6", "Qt::Sql", extra=["COMPONENTS", "Sql"]),
|
|
|
|
LibraryMapping("svg", "Qt6", "Qt::Svg", extra=["COMPONENTS", "Svg"]),
|
|
|
|
LibraryMapping("testlib", "Qt6", "Qt::Test", extra=["COMPONENTS", "Test"]),
|
|
|
|
LibraryMapping("texttospeech", "Qt6", "Qt::TextToSpeech", extra=["COMPONENTS", "TextToSpeech"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"theme_support", "Qt6", "Qt::ThemeSupport", extra=["COMPONENTS", "ThemeSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping("tts", "Qt6", "Qt::TextToSpeech", extra=["COMPONENTS", "TextToSpeech"]),
|
|
|
|
LibraryMapping("uiplugin", "Qt6", "Qt::UiPlugin", extra=["COMPONENTS", "UiPlugin"]),
|
|
|
|
LibraryMapping("uitools", "Qt6", "Qt::UiTools", extra=["COMPONENTS", "UiTools"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"virtualkeyboard", "Qt6", "Qt::VirtualKeyboard", extra=["COMPONENTS", "VirtualKeyboard"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"vulkan_support", "Qt6", "Qt::VulkanSupport", extra=["COMPONENTS", "VulkanSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"waylandclient", "Qt6", "Qt::WaylandClient", extra=["COMPONENTS", "WaylandClient"]
|
|
|
|
),
|
2019-09-18 13:04:52 +00:00
|
|
|
LibraryMapping(
|
2019-10-10 15:15:58 +00:00
|
|
|
"waylandcompositor",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::WaylandCompositor",
|
|
|
|
extra=["COMPONENTS", "WaylandCompositor"],
|
2019-09-18 13:04:52 +00:00
|
|
|
),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("webchannel", "Qt6", "Qt::WebChannel", extra=["COMPONENTS", "WebChannel"]),
|
|
|
|
LibraryMapping("webengine", "Qt6", "Qt::WebEngine", extra=["COMPONENTS", "WebEngine"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"webenginewidgets", "Qt6", "Qt::WebEngineWidgets", extra=["COMPONENTS", "WebEngineWidgets"]
|
|
|
|
),
|
|
|
|
LibraryMapping("websockets", "Qt6", "Qt::WebSockets", extra=["COMPONENTS", "WebSockets"]),
|
|
|
|
LibraryMapping("webview", "Qt6", "Qt::WebView", extra=["COMPONENTS", "WebView"]),
|
|
|
|
LibraryMapping("widgets", "Qt6", "Qt::Widgets", extra=["COMPONENTS", "Widgets"]),
|
|
|
|
LibraryMapping("window-lib", "Qt6", "Qt::AppManWindow", extra=["COMPONENTS", "AppManWindow"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"windowsuiautomation_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::WindowsUIAutomationSupport",
|
|
|
|
extra=["COMPONENTS", "WindowsUIAutomationSupport"],
|
|
|
|
),
|
|
|
|
LibraryMapping("winextras", "Qt6", "Qt::WinExtras", extra=["COMPONENTS", "WinExtras"]),
|
|
|
|
LibraryMapping("x11extras", "Qt6", "Qt::X11Extras", extra=["COMPONENTS", "X11Extras"]),
|
|
|
|
LibraryMapping("xcb_qpa_lib", "Qt6", "Qt::XcbQpa", extra=["COMPONENTS", "XcbQpa"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"xkbcommon_support", "Qt6", "Qt::XkbCommonSupport", extra=["COMPONENTS", "XkbCommonSupport"]
|
|
|
|
),
|
|
|
|
LibraryMapping("xmlpatterns", "Qt6", "Qt::XmlPatterns", extra=["COMPONENTS", "XmlPatterns"]),
|
|
|
|
LibraryMapping("xml", "Qt6", "Qt::Xml", extra=["COMPONENTS", "Xml"]),
|
|
|
|
LibraryMapping(
|
|
|
|
"qmlworkerscript", "Qt6", "Qt::QmlWorkerScript", extra=["COMPONENTS", "QmlWorkerScript"]
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"quickparticles", "Qt6", "Qt::QuickParticles", extra=["COMPONENTS", "QuickParticles"]
|
2019-11-12 10:19:58 +00:00
|
|
|
),
|
|
|
|
LibraryMapping(
|
2019-11-13 09:53:59 +00:00
|
|
|
"linuxofono_support",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::LinuxOfonoSupport",
|
|
|
|
extra=["COMPONENTS", "LinuxOfonoSupport"],
|
2019-11-20 08:25:19 +00:00
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"linuxofono_support_private",
|
|
|
|
"Qt6",
|
|
|
|
"Qt::LinuxOfonoSupportPrivate",
|
|
|
|
extra=["COMPONENTS", "LinuxOfonoSupportPrivate"],
|
2019-12-09 12:12:20 +00:00
|
|
|
),
|
2020-01-16 08:39:26 +00:00
|
|
|
LibraryMapping("tools", "Qt6", "Qt::Tools", extra=["COMPONENTS", "Tools"]),
|
|
|
|
LibraryMapping("axcontainer", "Qt6", "Qt::AxContainer", extra=["COMPONENTS", "AxContainer"]),
|
2019-12-11 09:42:47 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"webkitwidgets", "Qt6", "Qt::WebKitWidgets", extra=["COMPONENTS", "WebKitWidgets"]
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"zlib", "Qt6", "Qt::Zlib", extra=["COMPONENTS", "Zlib"]
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
)
|
2019-05-03 13:02:32 +00:00
|
|
|
]
|
|
|
|
|
2019-05-17 12:22:57 +00:00
|
|
|
# Note that the library map is adjusted dynamically further down.
|
2019-05-03 13:02:32 +00:00
|
|
|
_library_map = [
|
|
|
|
# 3rd party:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("atspi", "ATSPI2", "PkgConfig::ATSPI2"),
|
2019-09-24 06:27:25 +00:00
|
|
|
LibraryMapping("bluez", "BlueZ", "PkgConfig::BlueZ"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("corewlan", None, None),
|
|
|
|
LibraryMapping("cups", "Cups", "Cups::Cups"),
|
2019-09-24 09:35:56 +00:00
|
|
|
LibraryMapping("directfb", "DirectFB", "PkgConfig::DirectFB"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("db2", "DB2", "DB2::DB2"),
|
|
|
|
LibraryMapping("dbus", "WrapDBus1", "dbus-1", resultVariable="DBus1"),
|
|
|
|
LibraryMapping("doubleconversion", None, None),
|
|
|
|
LibraryMapping("drm", "Libdrm", "Libdrm::Libdrm"),
|
|
|
|
LibraryMapping("egl", "EGL", "EGL::EGL"),
|
|
|
|
LibraryMapping("flite", "Flite", "Flite::Flite"),
|
|
|
|
LibraryMapping("flite_alsa", "ALSA", "ALSA::ALSA"),
|
|
|
|
LibraryMapping(
|
|
|
|
"fontconfig", "Fontconfig", "Fontconfig::Fontconfig", resultVariable="FONTCONFIG"
|
|
|
|
),
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"freetype",
|
|
|
|
"WrapFreetype",
|
|
|
|
"WrapFreetype::WrapFreetype",
|
|
|
|
extra=["REQUIRED"],
|
|
|
|
is_bundled_with_qt=True,
|
|
|
|
),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("gbm", "gbm", "gbm::gbm"),
|
|
|
|
LibraryMapping("glib", "GLIB2", "GLIB2::GLIB2"),
|
|
|
|
LibraryMapping("gnu_iconv", None, None),
|
|
|
|
LibraryMapping("gtk3", "GTK3", "PkgConfig::GTK3"),
|
2019-10-11 14:55:55 +00:00
|
|
|
LibraryMapping("gssapi", "GSSAPI", "GSSAPI::GSSAPI"),
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz", is_bundled_with_qt=True
|
|
|
|
),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("host_dbus", None, None),
|
|
|
|
LibraryMapping(
|
|
|
|
"icu", "ICU", "ICU::i18n ICU::uc ICU::data", extra=["COMPONENTS", "i18n", "uc", "data"]
|
|
|
|
),
|
|
|
|
LibraryMapping("journald", "Libsystemd", "PkgConfig::Libsystemd"),
|
|
|
|
LibraryMapping("jpeg", "JPEG", "JPEG::JPEG"), # see also libjpeg
|
|
|
|
LibraryMapping("libatomic", "Atomic", "Atomic"),
|
|
|
|
LibraryMapping("libclang", "WrapLibClang", "WrapLibClang::WrapLibClang"),
|
|
|
|
LibraryMapping("libdl", None, "${CMAKE_DL_LIBS}"),
|
|
|
|
LibraryMapping("libinput", "Libinput", "Libinput::Libinput"),
|
|
|
|
LibraryMapping("libjpeg", "JPEG", "JPEG::JPEG"), # see also jpeg
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
LibraryMapping("libpng", "WrapPNG", "WrapPNG::WrapPNG", is_bundled_with_qt=True),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("libproxy", "Libproxy", "PkgConfig::Libproxy"),
|
|
|
|
LibraryMapping("librt", "WrapRt", "WrapRt"),
|
|
|
|
LibraryMapping("libudev", "Libudev", "PkgConfig::Libudev"),
|
|
|
|
LibraryMapping("lttng-ust", "LTTngUST", "LTTng::UST", resultVariable="LTTNGUST"),
|
|
|
|
LibraryMapping("mtdev", "Mtdev", "PkgConfig::Mtdev"),
|
|
|
|
LibraryMapping("mysql", "MySQL", "MySQL::MySQL"),
|
|
|
|
LibraryMapping("odbc", "ODBC", "ODBC::ODBC"),
|
|
|
|
LibraryMapping("opengl_es2", "GLESv2", "GLESv2::GLESv2"),
|
|
|
|
LibraryMapping("opengl", "OpenGL", "OpenGL::GL", resultVariable="OpenGL_OpenGL"),
|
|
|
|
LibraryMapping(
|
|
|
|
"openssl_headers",
|
|
|
|
"OpenSSL",
|
|
|
|
"OpenSSL::SSL_nolink",
|
|
|
|
resultVariable="OPENSSL_INCLUDE_DIR",
|
|
|
|
appendFoundSuffix=False,
|
|
|
|
),
|
|
|
|
LibraryMapping("openssl", "OpenSSL", "OpenSSL::SSL"),
|
|
|
|
LibraryMapping("oci", "Oracle", "Oracle::OCI"),
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"pcre2", "WrapPCRE2", "WrapPCRE2::WrapPCRE2", extra=["REQUIRED"], is_bundled_with_qt=True
|
|
|
|
),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("posix_iconv", None, None),
|
|
|
|
LibraryMapping("pps", "PPS", "PPS::PPS"),
|
|
|
|
LibraryMapping("psql", "PostgreSQL", "PostgreSQL::PostgreSQL"),
|
|
|
|
LibraryMapping("slog2", "Slog2", "Slog2::Slog2"),
|
|
|
|
LibraryMapping("speechd", "SpeechDispatcher", "SpeechDispatcher::SpeechDispatcher"),
|
|
|
|
LibraryMapping("sqlite2", None, None), # No more sqlite2 support in Qt6!
|
|
|
|
LibraryMapping("sqlite3", "SQLite3", "SQLite::SQLite3"),
|
|
|
|
LibraryMapping("sun_iconv", None, None),
|
|
|
|
LibraryMapping("tslib", "Tslib", "PkgConfig::Tslib"),
|
|
|
|
LibraryMapping("udev", "Libudev", "PkgConfig::Libudev"),
|
|
|
|
LibraryMapping("udev", "Libudev", "PkgConfig::Libudev"), # see also libudev!
|
|
|
|
LibraryMapping("vulkan", "Vulkan", "Vulkan::Vulkan"),
|
2019-10-11 09:17:55 +00:00
|
|
|
LibraryMapping("wayland_server", "Wayland", "Wayland::Server"), # used in qtbase/src/gui
|
|
|
|
LibraryMapping("wayland-server", "Wayland", "Wayland::Server"), # used in qtwayland
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("wayland-client", "Wayland", "Wayland::Client"),
|
|
|
|
LibraryMapping("wayland-cursor", "Wayland", "Wayland::Cursor"),
|
|
|
|
LibraryMapping("wayland-egl", "Wayland", "Wayland::Egl"),
|
2019-10-10 15:15:58 +00:00
|
|
|
LibraryMapping(
|
|
|
|
"wayland-kms", "Waylandkms", "PkgConfig::Waylandkms"
|
|
|
|
), # TODO: check if this actually works
|
2019-09-18 13:04:52 +00:00
|
|
|
LibraryMapping("x11", "X11", "X11::X11"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("x11sm", "X11", "${X11_SM_LIB} ${X11_ICE_LIB}", resultVariable="X11_SM"),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb",
|
|
|
|
"XCB",
|
|
|
|
"XCB::XCB",
|
|
|
|
extra=["1.9"],
|
|
|
|
resultVariable="TARGET XCB::XCB",
|
|
|
|
appendFoundSuffix=False,
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_glx", "XCB", "XCB::GLX", extra=["COMPONENTS", "GLX"], resultVariable="XCB_GLX"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_icccm", "XCB", "XCB::ICCCM", extra=["COMPONENTS", "ICCCM"], resultVariable="XCB_ICCCM"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_image", "XCB", "XCB::IMAGE", extra=["COMPONENTS", "IMAGE"], resultVariable="XCB_IMAGE"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_keysyms",
|
|
|
|
"XCB",
|
|
|
|
"XCB::KEYSYMS",
|
|
|
|
extra=["COMPONENTS", "KEYSYMS"],
|
|
|
|
resultVariable="XCB_KEYSYMS",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_randr", "XCB", "XCB::RANDR", extra=["COMPONENTS", "RANDR"], resultVariable="XCB_RANDR"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_render",
|
|
|
|
"XCB",
|
|
|
|
"XCB::RENDER",
|
|
|
|
extra=["COMPONENTS", "RENDER"],
|
|
|
|
resultVariable="XCB_RENDER",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_renderutil",
|
|
|
|
"XCB",
|
|
|
|
"XCB::RENDERUTIL",
|
|
|
|
extra=["COMPONENTS", "RENDERUTIL"],
|
|
|
|
resultVariable="XCB_RENDERUTIL",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_shape", "XCB", "XCB::SHAPE", extra=["COMPONENTS", "SHAPE"], resultVariable="XCB_SHAPE"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_shm", "XCB", "XCB::SHM", extra=["COMPONENTS", "SHM"], resultVariable="XCB_SHM"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_sync", "XCB", "XCB::SYNC", extra=["COMPONENTS", "SYNC"], resultVariable="XCB_SYNC"
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_xfixes",
|
|
|
|
"XCB",
|
|
|
|
"XCB::XFIXES",
|
|
|
|
extra=["COMPONENTS", "XFIXES"],
|
|
|
|
resultVariable="XCB_XFIXES",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_xinerama",
|
|
|
|
"XCB",
|
|
|
|
"XCB::XINERAMA",
|
|
|
|
extra=["COMPONENTS", "XINERAMA"],
|
|
|
|
resultVariable="XCB_XINERAMA",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_xinput",
|
|
|
|
"XCB",
|
|
|
|
"XCB::XINPUT",
|
|
|
|
extra=["COMPONENTS", "XINPUT"],
|
|
|
|
resultVariable="XCB_XINPUT",
|
|
|
|
),
|
|
|
|
LibraryMapping(
|
|
|
|
"xcb_xkb", "XCB", "XCB::XKB", extra=["COMPONENTS", "XKB"], resultVariable="XCB_XKB"
|
|
|
|
),
|
|
|
|
LibraryMapping("xcb_xlib", "X11_XCB", "X11::XCB"),
|
2019-10-10 15:15:58 +00:00
|
|
|
LibraryMapping("xcomposite", "XComposite", "PkgConfig::XComposite"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("xkbcommon_evdev", "XKB", "XKB::XKB", extra=["0.4.1"]), # see also xkbcommon
|
2020-02-24 13:24:25 +00:00
|
|
|
LibraryMapping("xkbcommon_x11", "XKB_COMMON_X11", "PkgConfig::XKB_COMMON_X11", extra=["0.4.1"]),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.4.1"]),
|
2020-02-24 13:24:25 +00:00
|
|
|
LibraryMapping("xlib", "X11", "X11::X11"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("xrender", "XRender", "PkgConfig::XRender"),
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB"),
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD"),
|
|
|
|
LibraryMapping("tiff", "TIFF", "TIFF::TIFF"),
|
|
|
|
LibraryMapping("webp", "WrapWebP", "WrapWebP::WrapWebP"),
|
|
|
|
LibraryMapping("jasper", "WrapJasper", "WrapJasper::WrapJasper"),
|
2019-10-03 08:56:32 +00:00
|
|
|
LibraryMapping("sdl2", "WrapSDL2", "WrapSDL2::WrapSDL2"),
|
2020-01-27 06:08:39 +00:00
|
|
|
LibraryMapping("assimp", "WrapAssimp", "WrapAssimp::WrapAssimp", extra=["5"]),
|
2019-05-03 13:02:32 +00:00
|
|
|
]
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
|
2019-05-17 12:22:57 +00:00
|
|
|
def _adjust_library_map():
|
|
|
|
# Assign a Linux condition on all x and wayland related packages.
|
|
|
|
# We don't want to get pages of package not found messages on
|
|
|
|
# Windows and macOS, and this also improves configure time on
|
|
|
|
# those platforms.
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
linux_package_prefixes = ["xcb", "x11", "xkb", "xrender", "xlib", "wayland"]
|
2019-05-17 12:22:57 +00:00
|
|
|
for i, _ in enumerate(_library_map):
|
|
|
|
if any([_library_map[i].soName.startswith(p) for p in linux_package_prefixes]):
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
_library_map[i].emit_if = "config.linux"
|
2019-05-17 12:22:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
_adjust_library_map()
|
|
|
|
|
|
|
|
|
2019-05-06 10:26:31 +00:00
|
|
|
def find_3rd_party_library_mapping(soName: str) -> typing.Optional[LibraryMapping]:
|
2019-05-03 13:02:32 +00:00
|
|
|
for i in _library_map:
|
|
|
|
if i.soName == soName:
|
|
|
|
return i
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
def find_qt_library_mapping(soName: str) -> typing.Optional[LibraryMapping]:
|
|
|
|
for i in _qt_library_map:
|
|
|
|
if i.soName == soName:
|
|
|
|
return i
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
2019-05-09 08:59:13 +00:00
|
|
|
def find_library_info_for_target(targetName: str) -> typing.Optional[LibraryMapping]:
|
|
|
|
qt_target = targetName
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
if targetName.endswith("Private"):
|
2019-05-09 08:59:13 +00:00
|
|
|
qt_target = qt_target[:-7]
|
|
|
|
|
|
|
|
for i in _qt_library_map:
|
|
|
|
if i.targetName == qt_target:
|
|
|
|
return i
|
|
|
|
|
|
|
|
for i in _library_map:
|
|
|
|
if i.targetName == targetName:
|
|
|
|
return i
|
|
|
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
2019-10-08 13:07:41 +00:00
|
|
|
def featureName(name: str) -> str:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
replacement_char = "_"
|
2019-10-08 13:07:41 +00:00
|
|
|
if name.startswith("c++"):
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
replacement_char = "x"
|
2019-10-08 13:07:41 +00:00
|
|
|
return re.sub(r"[^a-zA-Z0-9_]", replacement_char, name)
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
def map_qt_library(lib: str) -> str:
|
|
|
|
private = False
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
if lib.endswith("-private"):
|
2018-10-24 13:20:27 +00:00
|
|
|
private = True
|
|
|
|
lib = lib[:-8]
|
2019-05-03 13:02:32 +00:00
|
|
|
mapped = find_qt_library_mapping(lib)
|
|
|
|
qt_name = lib
|
|
|
|
if mapped:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
assert mapped.targetName # Qt libs must have a target name set
|
2019-05-03 13:02:32 +00:00
|
|
|
qt_name = mapped.targetName
|
2018-10-24 13:20:27 +00:00
|
|
|
if private:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
qt_name += "Private"
|
2019-05-03 13:02:32 +00:00
|
|
|
return qt_name
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
platform_mapping = {
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
"win32": "WIN32",
|
|
|
|
"win": "WIN32",
|
|
|
|
"unix": "UNIX",
|
|
|
|
"darwin": "APPLE",
|
|
|
|
"linux": "LINUX",
|
|
|
|
"integrity": "INTEGRITY",
|
|
|
|
"qnx": "QNX",
|
|
|
|
"vxworks": "VXWORKS",
|
|
|
|
"hpux": "HPUX",
|
|
|
|
"nacl": "NACL",
|
|
|
|
"android": "ANDROID",
|
|
|
|
"android-embedded": "ANDROID_EMBEDDED",
|
|
|
|
"uikit": "APPLE_UIKIT",
|
|
|
|
"tvos": "APPLE_TVOS",
|
|
|
|
"watchos": "APPLE_WATCHOS",
|
|
|
|
"winrt": "WINRT",
|
|
|
|
"wasm": "WASM",
|
2019-09-20 12:27:35 +00:00
|
|
|
"emscripten": "EMSCRIPTEN",
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
"msvc": "MSVC",
|
|
|
|
"clang": "CLANG",
|
|
|
|
"gcc": "GCC",
|
|
|
|
"icc": "ICC",
|
|
|
|
"intel_icc": "ICC",
|
|
|
|
"osx": "APPLE_OSX",
|
|
|
|
"ios": "APPLE_IOS",
|
|
|
|
"freebsd": "FREEBSD",
|
|
|
|
"openbsd": "OPENBSD",
|
|
|
|
"netbsd": "NETBSD",
|
|
|
|
"haiku": "HAIKU",
|
|
|
|
"netbsd": "NETBSD",
|
|
|
|
"mac": "APPLE",
|
|
|
|
"macx": "APPLE_OSX",
|
|
|
|
"macos": "APPLE_OSX",
|
|
|
|
"macx-icc": "(APPLE_OSX AND ICC)",
|
2018-10-24 13:20:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-06 10:26:31 +00:00
|
|
|
def map_platform(platform: str) -> str:
|
2018-10-24 13:20:27 +00:00
|
|
|
""" Return the qmake platform as cmake platform or the unchanged string. """
|
|
|
|
return platform_mapping.get(platform, platform)
|
|
|
|
|
|
|
|
|
2019-05-06 10:26:31 +00:00
|
|
|
def is_known_3rd_party_library(lib: str) -> bool:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
if lib.endswith("/nolink") or lib.endswith("_nolink"):
|
2019-05-06 10:26:31 +00:00
|
|
|
lib = lib[:-7]
|
|
|
|
mapping = find_3rd_party_library_mapping(lib)
|
|
|
|
|
2019-05-06 14:44:31 +00:00
|
|
|
return mapping is not None
|
2019-05-06 10:26:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
def map_3rd_party_library(lib: str) -> str:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
libpostfix = ""
|
|
|
|
if lib.endswith("/nolink"):
|
2019-03-28 14:25:17 +00:00
|
|
|
lib = lib[:-7]
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
libpostfix = "_nolink"
|
2019-05-06 10:26:31 +00:00
|
|
|
mapping = find_3rd_party_library_mapping(lib)
|
|
|
|
if not mapping or not mapping.targetName:
|
|
|
|
return lib
|
2019-05-03 13:02:32 +00:00
|
|
|
return mapping.targetName + libpostfix
|
2019-05-09 08:51:27 +00:00
|
|
|
|
|
|
|
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
def generate_find_package_info(
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
lib: LibraryMapping,
|
|
|
|
use_qt_find_package: bool = True,
|
|
|
|
*,
|
|
|
|
indent: int = 0,
|
|
|
|
emit_if: str = "",
|
|
|
|
use_system_package_name: bool = False,
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
) -> str:
|
2019-05-09 08:51:27 +00:00
|
|
|
isRequired = False
|
|
|
|
|
|
|
|
extra = lib.extra.copy()
|
|
|
|
|
|
|
|
if "REQUIRED" in extra and use_qt_find_package:
|
|
|
|
isRequired = True
|
|
|
|
extra.remove("REQUIRED")
|
|
|
|
|
|
|
|
cmake_target_name = lib.targetName
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
assert cmake_target_name
|
2019-05-09 08:51:27 +00:00
|
|
|
|
|
|
|
# _nolink or not does not matter at this point:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
if cmake_target_name.endswith("_nolink") or cmake_target_name.endswith("/nolink"):
|
2019-05-09 08:51:27 +00:00
|
|
|
cmake_target_name = cmake_target_name[:-7]
|
|
|
|
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
initial_package_name = lib.packageName
|
|
|
|
package_name = initial_package_name
|
|
|
|
if use_system_package_name:
|
|
|
|
replace_args = ["Wrap", "WrapSystem"]
|
|
|
|
package_name = package_name.replace(*replace_args)
|
|
|
|
cmake_target_name = cmake_target_name.replace(*replace_args)
|
|
|
|
|
2019-05-09 08:51:27 +00:00
|
|
|
if cmake_target_name and use_qt_find_package:
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
extra += ["PROVIDED_TARGETS", cmake_target_name]
|
2019-05-09 08:51:27 +00:00
|
|
|
|
Improve styling of util/cmake scripts
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-16 22:11:17 +00:00
|
|
|
result = ""
|
|
|
|
one_ind = " "
|
2019-05-17 12:22:57 +00:00
|
|
|
ind = one_ind * indent
|
2019-05-09 08:51:27 +00:00
|
|
|
|
|
|
|
if use_qt_find_package:
|
|
|
|
if extra:
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
result = f"{ind}qt_find_package({package_name} {' '.join(extra)})\n"
|
2019-05-09 08:51:27 +00:00
|
|
|
else:
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
result = f"{ind}qt_find_package({package_name})\n"
|
2019-05-09 08:51:27 +00:00
|
|
|
|
|
|
|
if isRequired:
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
result += (
|
|
|
|
f"{ind}set_package_properties({initial_package_name} PROPERTIES TYPE REQUIRED)\n"
|
|
|
|
)
|
2019-05-09 08:51:27 +00:00
|
|
|
else:
|
|
|
|
if extra:
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
result = f"{ind}find_package({package_name} {' '.join(extra)})\n"
|
2019-05-09 08:51:27 +00:00
|
|
|
else:
|
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
|
|
|
result = f"{ind}find_package({package_name})\n"
|
2019-05-09 08:51:27 +00:00
|
|
|
|
2019-05-17 12:22:57 +00:00
|
|
|
# If a package should be found only in certain conditions, wrap
|
|
|
|
# the find_package call within that condition.
|
|
|
|
if emit_if:
|
2019-09-20 09:34:16 +00:00
|
|
|
result = f"if(({emit_if}) OR QT_FIND_ALL_PACKAGES_ALWAYS)\n{one_ind}{result}endif()\n"
|
2019-05-17 12:22:57 +00:00
|
|
|
|
2019-05-09 08:51:27 +00:00
|
|
|
return result
|
2019-05-24 15:29:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
def _set_up_py_parsing_nicer_debug_output(pp):
|
|
|
|
indent = -1
|
|
|
|
|
|
|
|
def increase_indent(fn):
|
|
|
|
def wrapper_function(*args):
|
|
|
|
nonlocal indent
|
|
|
|
indent += 1
|
|
|
|
print("> " * indent, end="")
|
|
|
|
return fn(*args)
|
|
|
|
|
|
|
|
return wrapper_function
|
|
|
|
|
|
|
|
def decrease_indent(fn):
|
|
|
|
def wrapper_function(*args):
|
|
|
|
nonlocal indent
|
|
|
|
print("> " * indent, end="")
|
|
|
|
indent -= 1
|
|
|
|
return fn(*args)
|
|
|
|
|
|
|
|
return wrapper_function
|
|
|
|
|
|
|
|
pp._defaultStartDebugAction = increase_indent(pp._defaultStartDebugAction)
|
|
|
|
pp._defaultSuccessDebugAction = decrease_indent(pp._defaultSuccessDebugAction)
|
|
|
|
pp._defaultExceptionDebugAction = decrease_indent(pp._defaultExceptionDebugAction)
|