Skip to content

Commit

Permalink
qt-advanced-docking-system: Modernize to Conan V2 and add new version
Browse files Browse the repository at this point in the history
  • Loading branch information
leha-bot committed Sep 30, 2023
1 parent 7407669 commit 41f6b76
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions recipes/qt-advanced-docking-system/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.8.4":
url: "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/refs/tags/3.8.3.tar.gz"
sha256: "0"
"3.8.3":
url: "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/refs/tags/3.8.3.tar.gz"
sha256: "bd5a9469b755bedf33baefd0b3dda6d167b7917a2888e2794eed5abee7d78f74"
Expand Down
16 changes: 9 additions & 7 deletions recipes/qt-advanced-docking-system/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from conan import ConanFile
from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir
from conans import CMake
from conan.tools.cmake import CMakeDeps, cmake_layout
import os

required_conan_version = ">=1.52.0"
Expand All @@ -26,14 +26,13 @@ class QtADS(ConanFile):
"shared": False,
"fPIC": True,
}
generators = "cmake", "cmake_find_package", "cmake_find_package_multi"
generators = "CMakeDeps"

_cmake = None
_qt_version = "5.15.6"
_qt_version = "5.15.10"

@property
def _source_subfolder(self):
return "source_subfolder"
def layout(self):
cmake_layout(self)

def export_sources(self):
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
Expand All @@ -52,7 +51,7 @@ def requirements(self):

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True,
destination=self._source_subfolder)
destination=self.source_folder)

def _configure_cmake(self):
if self._cmake:
Expand All @@ -75,6 +74,9 @@ def _patch_sources(self):
f"#include <{self._qt_version}/QtGui/qpa/qplatformnativeinterface.h>"
)

def generate(self):
_configure_cmake()

def build(self):
self._patch_sources()
cmake = self._configure_cmake()
Expand Down
2 changes: 2 additions & 0 deletions recipes/qt-advanced-docking-system/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.8.4":
folder: "all"
"3.8.3":
folder: "all"
"3.8.2":
Expand Down

0 comments on commit 41f6b76

Please sign in to comment.