Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Qt6: minor formatting fixes #67

Merged
merged 1 commit into from
Feb 21, 2024
Merged
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
25 changes: 12 additions & 13 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class QtConan(ConanFile):
_submodules = ["qtsvg", "qtdeclarative", "qttools", "qttranslations", "qtdoc",
"qtwayland","qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat",
"qtwayland", "qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat",
"qtactiveqt", "qtcharts", "qtdatavis3d", "qtlottie", "qtscxml", "qtvirtualkeyboard",
"qt3d", "qtimageformats", "qtnetworkauth", "qtcoap", "qtmqtt", "qtopcua",
"qtmultimedia", "qtlocation", "qtsensors", "qtconnectivity", "qtserialbus",
Expand Down Expand Up @@ -149,7 +149,6 @@ def _get_module_tree(self):
if config.has_option(section, "depends"):
self._submodules_tree[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()]


return self._submodules_tree

def export_sources(self):
Expand Down Expand Up @@ -554,7 +553,7 @@ def generate(self):
tc.variables["FEATURE_framework"] = "OFF"
elif self.settings.os == "Android":
tc.variables["CMAKE_ANDROID_NATIVE_API_LEVEL"] = self.settings.os.api_level
tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a",
tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a",
"armv8": "arm64-v8a",
"x86": "x86",
"x86_64": "x86_64"}.get(str(self.settings.arch))
Expand All @@ -577,7 +576,7 @@ def generate(self):

tc.variables["FEATURE_pkg_config"] = "ON"
if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and not self.options.shared:
tc.variables["BUILD_WITH_PCH"]= "OFF" # disabling PCH to save disk space
tc.variables["BUILD_WITH_PCH"] = "OFF" # disabling PCH to save disk space

if self.settings.os == "Windows":
tc.variables["HOST_PERL"] = self.dependencies.build["strawberryperl"].conf_info.get("user.strawberryperl:perl", check_type=str)
Expand All @@ -592,11 +591,11 @@ def generate(self):
14: "FEATURE_cxx14",
17: "FEATURE_cxx17",
20: "FEATURE_cxx20"
}
}
if Version(self.version) >= "6.5.0":
cpp_std_map[23] = "FEATURE_cxx2b"

for std,feature in cpp_std_map.items():
for std, feature in cpp_std_map.items():
tc.variables[feature] = "ON" if int(current_cpp_std) >= std else "OFF"

tc.variables["QT_USE_VCPKG"] = False
Expand Down Expand Up @@ -651,7 +650,7 @@ def source(self):
# use official variable name https://cmake.org/cmake/help/latest/module/FindFontconfig.html
replace_in_file(self, os.path.join(self.source_folder, "qtbase", "src", "gui", "configure.cmake"), "FONTCONFIG_FOUND", "Fontconfig_FOUND")

replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake") , "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()")
replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake"), "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()")

def _xplatform(self):
if self.settings.os == "Linux":
Expand Down Expand Up @@ -753,8 +752,8 @@ def _xplatform(self):

def build(self):
if self.settings.os == "Macos":
save(self, ".qmake.stash" , "")
save(self, ".qmake.super" , "")
save(self, ".qmake.stash", "")
save(self, ".qmake.super", "")
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand All @@ -772,8 +771,8 @@ def _cmake_qt6_private_file(self, module):

def package(self):
if self.settings.os == "Macos":
save(self, ".qmake.stash" , "")
save(self, ".qmake.super" , "")
save(self, ".qmake.stash", "")
save(self, ".qmake.super", "")
cmake = CMake(self)
cmake.install()
copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses"),
Expand Down Expand Up @@ -1060,7 +1059,7 @@ def _create_plugin(pluginname, libname, plugintype, requires):
self.cpp_info.components["qtGui"].system_libs.append("d3d12")
if Version(self.version) >= "6.7.0":
# https://github.com/qt/qtbase/blob/v6.7.0-beta1/src/gui/CMakeLists.txt#L430
self.cpp_info.components["qtGui"].system_libs.append("uxtheme")
self.cpp_info.components["qtGui"].system_libs.append("uxtheme")
if self.settings.compiler == "gcc":
self.cpp_info.components["qtGui"].system_libs.append("uuid")
# https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/direct2d/CMakeLists.txt#L60-L82
Expand Down Expand Up @@ -1202,7 +1201,7 @@ def _create_plugin(pluginname, libname, plugintype, requires):
_create_module("Quick3DRuntimeRender", ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"])
_create_module("Quick3D", ["Gui", "Qml", "Quick", "Quick3DRuntimeRender"])

if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative ) and qt_quick_enabled:
if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative) and qt_quick_enabled:
_create_module("QuickControls2", ["Gui", "Quick"])
_create_module("QuickTemplates2", ["Gui", "Quick"])

Expand Down
Loading