from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.files import get
class QtCreatorRecipe(ConanFile):
name = "qtcreator"
version = "12.0.2"
author = "Gernot Walzl"
package_type = "application"
settings = "os", "compiler", "build_type", "arch"
def source(self):
sourcefile = f"qt-creator-opensource-src-{self.version}.tar.xz"
download = f"https://download.qt.io/official_releases/qtcreator/12.0/{self.version}/{sourcefile}"
md5sum = "110a36302e3ca0c2fd00cee7c9764571"
get(self, download, md5=md5sum, strip_root=True)
def requirements(self):
self.requires("qt/6.5.3")
def layout(self):
cmake_layout(self, src_folder="src")
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self, generator="Ninja")
tc.variables["CMAKE_FIND_PACKAGE_PREFER_CONFIG"] = False # for plugin ClangFormat
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()