Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QuickPrivate module #19082

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@
filecontents += 'set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_GADGET_EXPORT" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT")\n'
save(self, os.path.join(self.package_folder, self._cmake_core_extras_file), filecontents)

def _create_private_module(module, dependencies=[]):

Check warning on line 936 in recipes/qt/5.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Dangerous default value [] as argument
if "Core" not in dependencies:
dependencies.append("Core")
dependencies_string = ';'.join(f'Qt5::{dependency}' for dependency in dependencies)
Expand Down Expand Up @@ -964,6 +964,8 @@

if self.options.qtdeclarative:
_create_private_module("Qml", ["CorePrivate", "Qml"])
if self.options.gui:
_create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"])

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "Qt5")
Expand Down Expand Up @@ -1002,7 +1004,7 @@
reqs.append(corrected_req)
return reqs

def _create_module(module, requires=[], has_include_dir=True):

Check warning on line 1007 in recipes/qt/5.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Dangerous default value [] as argument
componentname = f"qt{module}"
assert componentname not in self.cpp_info.components, f"Module {module} already present in self.cpp_info.components"
self.cpp_info.components[componentname].set_property("cmake_target_name", f"Qt5::{module}")
Expand Down Expand Up @@ -1233,6 +1235,7 @@
self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"])
if self.options.gui:
_create_module("Quick", ["Gui", "Qml", "QmlModels"])
_add_build_module("qtQuick", self._cmake_qt5_private_file("Quick"))
if self.options.widgets:
_create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"])
_create_module("QuickShapes", ["Gui", "Qml", "Quick"])
Expand Down
3 changes: 3 additions & 0 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,8 @@ def _create_private_module(module, dependencies):
save(self, os.path.join(self.package_folder, "lib", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake"), textwrap.dedent("""\
set(QT_KNOWN_POLICY_QTP0001 TRUE)
"""))
if self.options.gui and self.options.qtshadertools:
_create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"])

if self.settings.os in ["Windows", "iOS"]:
contents = textwrap.dedent("""\
Expand Down Expand Up @@ -1222,6 +1224,7 @@ def _create_plugin(pluginname, libname, plugintype, requires):
self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"])
if qt_quick_enabled:
_create_module("Quick", ["Gui", "Qml", "QmlModels"])
_add_build_module("qtQuick", self._cmake_qt6_private_file("Quick"))
if self.options.widgets:
_create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"])
_create_module("QuickShapes", ["Gui", "Qml", "Quick"])
Expand Down
Loading