Skip to content

Commit a3e0ef1

Browse files
committed
Improve qt6 support
1 parent c1e60f0 commit a3e0ef1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

recipes/qarchive/all/conanfile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from conan import ConanFile
22
from conan.tools.files import get, apply_conandata_patches, rmdir, save, export_conandata_patches
33
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
4+
from conan.tools.scm import Version
45
import os
56
import textwrap
67

@@ -28,6 +29,10 @@ class QarchiveConan(ConanFile):
2829
"fPIC": True,
2930
}
3031

32+
@property
33+
def _qt_major(self):
34+
return Version(self.deps_cpp_info["qt"].version).major
35+
3136
def export_sources(self):
3237
export_conandata_patches(self)
3338

@@ -55,6 +60,7 @@ def source(self):
5560

5661
def generate(self):
5762
tc = CMakeToolchain(self)
63+
tc.variables["QARCHIVE_QT_VERSION_MAJOR"] = self._qt_major
5864
tc.generate()
5965

6066
cd = CMakeDeps(self)

0 commit comments

Comments
 (0)