From a7772dee259e47b64311fa6327d4c89db158256f Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 10 Oct 2022 20:08:40 -0400 Subject: [PATCH 01/20] First attempt at making runtimeqml package --- recipes/runtimeqml/config.yml | 3 + recipes/runtimeqml/latest/CMakeLists.txt | 26 +++++++ recipes/runtimeqml/latest/conandata.yml | 4 ++ recipes/runtimeqml/latest/conanfile.py | 68 +++++++++++++++++++ .../latest/test_package/CMakeLists.txt | 19 ++++++ .../latest/test_package/conanfile.py | 33 +++++++++ .../runtimeqml/latest/test_package/main.cpp | 14 ++++ .../runtimeqml/latest/test_package/main.qml | 11 +++ .../runtimeqml/latest/test_package/qml.qrc | 5 ++ 9 files changed, 183 insertions(+) create mode 100644 recipes/runtimeqml/config.yml create mode 100644 recipes/runtimeqml/latest/CMakeLists.txt create mode 100644 recipes/runtimeqml/latest/conandata.yml create mode 100644 recipes/runtimeqml/latest/conanfile.py create mode 100644 recipes/runtimeqml/latest/test_package/CMakeLists.txt create mode 100644 recipes/runtimeqml/latest/test_package/conanfile.py create mode 100644 recipes/runtimeqml/latest/test_package/main.cpp create mode 100644 recipes/runtimeqml/latest/test_package/main.qml create mode 100644 recipes/runtimeqml/latest/test_package/qml.qrc diff --git a/recipes/runtimeqml/config.yml b/recipes/runtimeqml/config.yml new file mode 100644 index 0000000000000..32ab3a195dc6a --- /dev/null +++ b/recipes/runtimeqml/config.yml @@ -0,0 +1,3 @@ +versions: + "latest": + folder: "latest" diff --git a/recipes/runtimeqml/latest/CMakeLists.txt b/recipes/runtimeqml/latest/CMakeLists.txt new file mode 100644 index 0000000000000..5a560d3cbf126 --- /dev/null +++ b/recipes/runtimeqml/latest/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.18) + +project(RuntimeQml LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +find_package(Qt6 CONFIG REQUIRED) + +set(CODE_FILES + runtimeqml.cpp +) + +set(HEADER_FILES + runtimeqml.hpp +) + +add_library(RuntimeQml ${CODE_FILES} ${HEADER_FILES}) +target_link_libraries(RuntimeQml PRIVATE qt::qt) +set_target_properties(RuntimeQml PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) +set_target_properties(RuntimeQml PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +set_target_properties(RuntimeQml PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +target_include_directories(RuntimeQml PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/recipes/runtimeqml/latest/conandata.yml b/recipes/runtimeqml/latest/conandata.yml new file mode 100644 index 0000000000000..65100af72389c --- /dev/null +++ b/recipes/runtimeqml/latest/conandata.yml @@ -0,0 +1,4 @@ +sources: + "latest": + url: /~https://github.com/GIPdA/runtimeqml/archive/refs/heads/master.zip + sha256: "1bf2b8a6e9b9114ec94208db63a0f8de8becc2d85ca57661099d81e3122ecc47" diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py new file mode 100644 index 0000000000000..8aaa9661df3b3 --- /dev/null +++ b/recipes/runtimeqml/latest/conanfile.py @@ -0,0 +1,68 @@ +import os + +from conan import ConanFile +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir + +required_conan_version = ">=1.49.0" + + +class RuntimeQml(ConanFile): + name = "runtimeqml" + homepage = "/~https://github.com/GIPdA/runtimeqml" + description = "Enables hot-reloading qml files" + topics = ("qt", "hot-reload", "qml", "gui") + url = "/~https://github.com/conan-io/conan-center-index" + license = "BSD-3-Clause" + settings = "os", "arch", "compiler", "build_type" + + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + generators = "CMakeDeps", "CMakeToolchain" + + def export_sources(self): + self.copy("CMakeLists.txt", dst="src") + + def source(self): + get(self, **self.conan_data["sources"][str(self.version)], + destination=self.source_folder, strip_root=True) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("qt/[>=6.0.0]") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + + self.options["qt"].shared = True + self.options["qt"].qtdeclarative = True + self.options["qt"].qtshadertools = True + self.options["qt"].with_libjpeg = "libjpeg-turbo" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + self.copy(pattern="LICENSE", src=self.source_folder, dst="licenses") + self.copy(pattern="*.lib", dst="lib") + self.copy(pattern="*.dylib", dst="lib") + self.copy(pattern="*.so", dst="lib") + self.copy(pattern="*.dll", dst="bin") + self.copy(pattern="*.hpp", src=self.source_folder, dst="include") diff --git a/recipes/runtimeqml/latest/test_package/CMakeLists.txt b/recipes/runtimeqml/latest/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f7b4a9a216a8c --- /dev/null +++ b/recipes/runtimeqml/latest/test_package/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.18) + +project(RuntimeQmlTest LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +find_package(Qt6 CONFIG REQUIRED) +find_package(RuntimeQml CONFIG REQUIRED) + +add_executable(RuntimeQmlTest main.cpp) +target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) +set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) +set_target_properties(RuntimeQmlTest PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +set_target_properties(RuntimeQmlTest PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) diff --git a/recipes/runtimeqml/latest/test_package/conanfile.py b/recipes/runtimeqml/latest/test_package/conanfile.py new file mode 100644 index 0000000000000..74ada89eabd4f --- /dev/null +++ b/recipes/runtimeqml/latest/test_package/conanfile.py @@ -0,0 +1,33 @@ +from conans import ConanFile, tools +import os + +from conan import ConanFile +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + + generators = "CMakeDeps", "CMakeToolchain" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires("qt/[>=6.0.0]") + + def configure(self): + self.options["qt"].shared = True + self.options["qt"].qtdeclarative = True + self.options["qt"].qtshadertools = True + self.options["qt"].with_libjpeg = "libjpeg-turbo" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + pass \ No newline at end of file diff --git a/recipes/runtimeqml/latest/test_package/main.cpp b/recipes/runtimeqml/latest/test_package/main.cpp new file mode 100644 index 0000000000000..9a4c79fc33ca3 --- /dev/null +++ b/recipes/runtimeqml/latest/test_package/main.cpp @@ -0,0 +1,14 @@ +#include +#include +#include + +int main(int argc, char* argv[]) { + QApplication app(argc, argv); + QQmlApplicationEngine engine; + + RuntimeQml* rt = new RuntimeQml(&engine); + rt->parseQrc(ROOT_SOURCE_PATH "/qml.qrc"); + rt->setAutoReload(true); // Reload automatically on file update + rt->load(QStringLiteral("qrc:/main.qml")); + return app.exec(); +} diff --git a/recipes/runtimeqml/latest/test_package/main.qml b/recipes/runtimeqml/latest/test_package/main.qml new file mode 100644 index 0000000000000..6551ee731e000 --- /dev/null +++ b/recipes/runtimeqml/latest/test_package/main.qml @@ -0,0 +1,11 @@ +import QtQuick + +ApplicationWindow { + visible: true + width: 640 + height: 480 + title: "Runtime Qml Test" + Rectangle { + anchors.fill: parent + } +} \ No newline at end of file diff --git a/recipes/runtimeqml/latest/test_package/qml.qrc b/recipes/runtimeqml/latest/test_package/qml.qrc new file mode 100644 index 0000000000000..dc7d52ff09927 --- /dev/null +++ b/recipes/runtimeqml/latest/test_package/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + \ No newline at end of file From 23f5199914891a0963e465f8c5bdffe00b6e336a Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 10 Oct 2022 21:32:21 -0400 Subject: [PATCH 02/20] Finished recipe --- recipes/runtimeqml/latest/CMakeLists.txt | 22 +++++---------- recipes/runtimeqml/latest/conanfile.py | 27 +++++++++---------- .../latest/test_package/CMakeLists.txt | 2 +- .../latest/test_package/conanfile.py | 17 ++++++------ .../runtimeqml/latest/test_package/main.cpp | 1 + .../runtimeqml/latest/test_package/main.qml | 6 ++++- 6 files changed, 35 insertions(+), 40 deletions(-) diff --git a/recipes/runtimeqml/latest/CMakeLists.txt b/recipes/runtimeqml/latest/CMakeLists.txt index 5a560d3cbf126..a4a98b3588316 100644 --- a/recipes/runtimeqml/latest/CMakeLists.txt +++ b/recipes/runtimeqml/latest/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.18) -project(RuntimeQml LANGUAGES CXX) +project(runtimeqml LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) @@ -10,17 +10,9 @@ set(CMAKE_AUTORCC ON) find_package(Qt6 CONFIG REQUIRED) -set(CODE_FILES - runtimeqml.cpp -) - -set(HEADER_FILES - runtimeqml.hpp -) - -add_library(RuntimeQml ${CODE_FILES} ${HEADER_FILES}) -target_link_libraries(RuntimeQml PRIVATE qt::qt) -set_target_properties(RuntimeQml PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) -set_target_properties(RuntimeQml PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) -set_target_properties(RuntimeQml PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) -target_include_directories(RuntimeQml PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +add_library(${PROJECT_NAME} runtimeqml.hpp runtimeqml.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE qt::qt) +set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) +set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py index 8aaa9661df3b3..53f9d91e4876e 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/latest/conanfile.py @@ -1,9 +1,6 @@ -import os - from conan import ConanFile -from conan.tools.scm import Version -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import get, copy, rmdir +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.files import get required_conan_version = ">=1.49.0" @@ -29,15 +26,12 @@ class RuntimeQml(ConanFile): generators = "CMakeDeps", "CMakeToolchain" def export_sources(self): - self.copy("CMakeLists.txt", dst="src") + self.copy("CMakeLists.txt") def source(self): get(self, **self.conan_data["sources"][str(self.version)], destination=self.source_folder, strip_root=True) - def layout(self): - cmake_layout(self, src_folder="src") - def requirements(self): self.requires("qt/[>=6.0.0]") @@ -60,9 +54,12 @@ def build(self): cmake.build() def package(self): - self.copy(pattern="LICENSE", src=self.source_folder, dst="licenses") - self.copy(pattern="*.lib", dst="lib") - self.copy(pattern="*.dylib", dst="lib") - self.copy(pattern="*.so", dst="lib") - self.copy(pattern="*.dll", dst="bin") - self.copy(pattern="*.hpp", src=self.source_folder, dst="include") + self.copy(pattern="LICENSE", src=self.source_folder, dst="licenses", keep_path=False) + self.copy(pattern="*.lib", dst="lib", keep_path=False) + self.copy(pattern="*.dylib", dst="lib", keep_path=False) + self.copy(pattern="*.so", dst="lib", keep_path=False) + self.copy(pattern="*.dll", dst="bin", keep_path=False) + self.copy(pattern="*.hpp", src=self.source_folder, dst="include", keep_path=False) + + def package_info(self): + self.cpp_info.libs = ["runtimeqml"] diff --git a/recipes/runtimeqml/latest/test_package/CMakeLists.txt b/recipes/runtimeqml/latest/test_package/CMakeLists.txt index f7b4a9a216a8c..724fa9d6077e2 100644 --- a/recipes/runtimeqml/latest/test_package/CMakeLists.txt +++ b/recipes/runtimeqml/latest/test_package/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_AUTORCC ON) find_package(Qt6 CONFIG REQUIRED) find_package(RuntimeQml CONFIG REQUIRED) -add_executable(RuntimeQmlTest main.cpp) +add_executable(RuntimeQmlTest main.cpp qml.qrc) target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) diff --git a/recipes/runtimeqml/latest/test_package/conanfile.py b/recipes/runtimeqml/latest/test_package/conanfile.py index 74ada89eabd4f..f5563b7211df3 100644 --- a/recipes/runtimeqml/latest/test_package/conanfile.py +++ b/recipes/runtimeqml/latest/test_package/conanfile.py @@ -1,11 +1,6 @@ -from conans import ConanFile, tools -import os - from conan import ConanFile -from conan.tools.scm import Version -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import get, copy, rmdir - +from conan.tools.cmake import CMake, cmake_layout +import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" @@ -17,6 +12,7 @@ def layout(self): def requirements(self): self.requires("qt/[>=6.0.0]") + self.requires("runtimeqml/latest") def configure(self): self.options["qt"].shared = True @@ -30,4 +26,9 @@ def build(self): cmake.build() def test(self): - pass \ No newline at end of file + # if self.settings.os == "Windows": + # self.run(os.path.join(self.build_folder, "bin/RuntimeQmlTest.exe")) + # else: + # self.run(os.path.join(self.build_folder, "build/bin/RuntimeQmlTest")) + bin_path = os.path.join("bin", "RuntimeQmlTest") + self.run(bin_path, run_environment=True) \ No newline at end of file diff --git a/recipes/runtimeqml/latest/test_package/main.cpp b/recipes/runtimeqml/latest/test_package/main.cpp index 9a4c79fc33ca3..58ebeb68363d3 100644 --- a/recipes/runtimeqml/latest/test_package/main.cpp +++ b/recipes/runtimeqml/latest/test_package/main.cpp @@ -1,5 +1,6 @@ #include #include + #include int main(int argc, char* argv[]) { diff --git a/recipes/runtimeqml/latest/test_package/main.qml b/recipes/runtimeqml/latest/test_package/main.qml index 6551ee731e000..8205c93e49944 100644 --- a/recipes/runtimeqml/latest/test_package/main.qml +++ b/recipes/runtimeqml/latest/test_package/main.qml @@ -1,11 +1,15 @@ import QtQuick -ApplicationWindow { +Window { visible: true width: 640 height: 480 title: "Runtime Qml Test" Rectangle { anchors.fill: parent + Component.onCompleted: () => { + console.log("Successfully Loaded"); + Qt.quit(); + } } } \ No newline at end of file From bf4ee411cf0c0a8f87fbbe37e02573dd2128934b Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 10 Oct 2022 21:39:45 -0400 Subject: [PATCH 03/20] format --- recipes/runtimeqml/latest/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py index 53f9d91e4876e..41bd5ceb65f03 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/latest/conanfile.py @@ -54,12 +54,14 @@ def build(self): cmake.build() def package(self): - self.copy(pattern="LICENSE", src=self.source_folder, dst="licenses", keep_path=False) + self.copy(pattern="LICENSE", src=self.source_folder, + dst="licenses", keep_path=False) self.copy(pattern="*.lib", dst="lib", keep_path=False) self.copy(pattern="*.dylib", dst="lib", keep_path=False) self.copy(pattern="*.so", dst="lib", keep_path=False) self.copy(pattern="*.dll", dst="bin", keep_path=False) - self.copy(pattern="*.hpp", src=self.source_folder, dst="include", keep_path=False) - + self.copy(pattern="*.hpp", src=self.source_folder, + dst="include", keep_path=False) + def package_info(self): self.cpp_info.libs = ["runtimeqml"] From a0ec3644c9b5e5bd7a69abee75c655cd2970ac05 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 10 Oct 2022 21:41:45 -0400 Subject: [PATCH 04/20] Fix lint --- recipes/runtimeqml/latest/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py index 41bd5ceb65f03..c4b3d95e9bdf7 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/latest/conanfile.py @@ -1,10 +1,9 @@ from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake from conan.tools.files import get required_conan_version = ">=1.49.0" - class RuntimeQml(ConanFile): name = "runtimeqml" homepage = "/~https://github.com/GIPdA/runtimeqml" From bb1471f6a6fa6f9d30a1c8d15b58faadb96a52e5 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 10 Oct 2022 21:50:46 -0400 Subject: [PATCH 05/20] New changes --- recipes/runtimeqml/latest/conanfile.py | 2 -- recipes/runtimeqml/latest/test_package/conanfile.py | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py index c4b3d95e9bdf7..cba958f6b2fe3 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/latest/conanfile.py @@ -42,10 +42,8 @@ def configure(self): if self.options.shared: del self.options.fPIC - self.options["qt"].shared = True self.options["qt"].qtdeclarative = True self.options["qt"].qtshadertools = True - self.options["qt"].with_libjpeg = "libjpeg-turbo" def build(self): cmake = CMake(self) diff --git a/recipes/runtimeqml/latest/test_package/conanfile.py b/recipes/runtimeqml/latest/test_package/conanfile.py index f5563b7211df3..2d9d803657688 100644 --- a/recipes/runtimeqml/latest/test_package/conanfile.py +++ b/recipes/runtimeqml/latest/test_package/conanfile.py @@ -15,10 +15,8 @@ def requirements(self): self.requires("runtimeqml/latest") def configure(self): - self.options["qt"].shared = True self.options["qt"].qtdeclarative = True self.options["qt"].qtshadertools = True - self.options["qt"].with_libjpeg = "libjpeg-turbo" def build(self): cmake = CMake(self) @@ -26,9 +24,5 @@ def build(self): cmake.build() def test(self): - # if self.settings.os == "Windows": - # self.run(os.path.join(self.build_folder, "bin/RuntimeQmlTest.exe")) - # else: - # self.run(os.path.join(self.build_folder, "build/bin/RuntimeQmlTest")) bin_path = os.path.join("bin", "RuntimeQmlTest") - self.run(bin_path, run_environment=True) \ No newline at end of file + self.run(bin_path, run_environment=True) From bbe8bef9d763e8b01fa2a8d9130899bae9d579a9 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Thu, 13 Oct 2022 14:17:27 -0400 Subject: [PATCH 06/20] Update according to uilianries advice --- recipes/runtimeqml/latest/conanfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/latest/conanfile.py index cba958f6b2fe3..32bb320d38634 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/latest/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import get +from conan.errors import ConanInvalidConfiguration required_conan_version = ">=1.49.0" @@ -42,8 +43,10 @@ def configure(self): if self.options.shared: del self.options.fPIC - self.options["qt"].qtdeclarative = True - self.options["qt"].qtshadertools = True + def validate(self): + qt = self.dependencies["qt"] + if not qt.options.qtdeclarative and not qt.options.qtshaderTools: + raise ConanInvalidConfiguration(f"{self.ref} requires option qt:qtdeclarative=True and qt::qtshadertools=True") def build(self): cmake = CMake(self) From c2e36ba696a394df85c5424bd83a20dc7ba6c1ad Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Mon, 17 Oct 2022 19:53:57 -0400 Subject: [PATCH 07/20] add qt5 version of package and add hash version --- .../runtimeqml/{latest => all}/CMakeLists.txt | 11 ++++++-- recipes/runtimeqml/all/conandata.yml | 10 +++++++ .../runtimeqml/{latest => all}/conanfile.py | 11 +++++--- recipes/runtimeqml/config.yml | 6 +++- recipes/runtimeqml/latest/conandata.yml | 4 --- .../latest/test_package/CMakeLists.txt | 19 ------------- .../latest/test_package/conanfile.py | 28 ------------------- .../runtimeqml/latest/test_package/main.cpp | 15 ---------- .../runtimeqml/latest/test_package/main.qml | 15 ---------- .../runtimeqml/latest/test_package/qml.qrc | 5 ---- 10 files changed, 31 insertions(+), 93 deletions(-) rename recipes/runtimeqml/{latest => all}/CMakeLists.txt (69%) create mode 100644 recipes/runtimeqml/all/conandata.yml rename recipes/runtimeqml/{latest => all}/conanfile.py (87%) delete mode 100644 recipes/runtimeqml/latest/conandata.yml delete mode 100644 recipes/runtimeqml/latest/test_package/CMakeLists.txt delete mode 100644 recipes/runtimeqml/latest/test_package/conanfile.py delete mode 100644 recipes/runtimeqml/latest/test_package/main.cpp delete mode 100644 recipes/runtimeqml/latest/test_package/main.qml delete mode 100644 recipes/runtimeqml/latest/test_package/qml.qrc diff --git a/recipes/runtimeqml/latest/CMakeLists.txt b/recipes/runtimeqml/all/CMakeLists.txt similarity index 69% rename from recipes/runtimeqml/latest/CMakeLists.txt rename to recipes/runtimeqml/all/CMakeLists.txt index a4a98b3588316..ae4836bfd440c 100644 --- a/recipes/runtimeqml/latest/CMakeLists.txt +++ b/recipes/runtimeqml/all/CMakeLists.txt @@ -8,9 +8,16 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -find_package(Qt6 CONFIG REQUIRED) +find_package(Qt5 CONFIG) +find_package(Qt6 CONFIG) +if (Qt6_FOUND) + add_library(${PROJECT_NAME} runtimeqml.hpp runtimeqml.cpp) +elseif(Qt5_FOUND) + add_library(${PROJECT_NAME} runtimeqml.h runtimeqml.cpp) +else() + message(FATAL_ERROR "Qt was not found") +endif() -add_library(${PROJECT_NAME} runtimeqml.hpp runtimeqml.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE qt::qt) set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) diff --git a/recipes/runtimeqml/all/conandata.yml b/recipes/runtimeqml/all/conandata.yml new file mode 100644 index 0000000000000..c6fa8c067bd7d --- /dev/null +++ b/recipes/runtimeqml/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "latest": + url: /~https://github.com/GIPdA/runtimeqml/archive/refs/heads/master.zip + sha256: "1bf2b8a6e9b9114ec94208db63a0f8de8becc2d85ca57661099d81e3122ecc47" + "cci.20220923": + url: /~https://github.com/GIPdA/runtimeqml/archive/3ae5dadcf6548a2e59e83c21d84fd50575df79bf.zip + sha256: "18bf63ab2692e6cb8ed6e0dbfcd2390dc65769eaed43b66c4da9dd7a55598603" + "qt5": + url: /~https://github.com/GIPdA/runtimeqml/archive/ac0cbfc49ae215dd0df5ac8ecb79ca7008de5486.zip + sha256: "57c6d50f0fd281c0984daae65f3559942f58d11de8ff406c150d54fd7ff0d076" diff --git a/recipes/runtimeqml/latest/conanfile.py b/recipes/runtimeqml/all/conanfile.py similarity index 87% rename from recipes/runtimeqml/latest/conanfile.py rename to recipes/runtimeqml/all/conanfile.py index 32bb320d38634..2be6553de445f 100644 --- a/recipes/runtimeqml/latest/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -33,7 +33,10 @@ def source(self): destination=self.source_folder, strip_root=True) def requirements(self): - self.requires("qt/[>=6.0.0]") + if self.version == "qt5": + self.requires("qt/[>=5.0.0 <6.0.0]") + else: + self.requires("qt/[>=6.0.0]") def config_options(self): if self.settings.os == "Windows": @@ -45,8 +48,8 @@ def configure(self): def validate(self): qt = self.dependencies["qt"] - if not qt.options.qtdeclarative and not qt.options.qtshaderTools: - raise ConanInvalidConfiguration(f"{self.ref} requires option qt:qtdeclarative=True and qt::qtshadertools=True") + if not qt.options.qtdeclarative: + raise ConanInvalidConfiguration(f"{self.ref} requires option qt:qtdeclarative=True") def build(self): cmake = CMake(self) @@ -60,7 +63,7 @@ def package(self): self.copy(pattern="*.dylib", dst="lib", keep_path=False) self.copy(pattern="*.so", dst="lib", keep_path=False) self.copy(pattern="*.dll", dst="bin", keep_path=False) - self.copy(pattern="*.hpp", src=self.source_folder, + self.copy(pattern="*.h*", src=self.source_folder, dst="include", keep_path=False) def package_info(self): diff --git a/recipes/runtimeqml/config.yml b/recipes/runtimeqml/config.yml index 32ab3a195dc6a..26bfdc3f99cd2 100644 --- a/recipes/runtimeqml/config.yml +++ b/recipes/runtimeqml/config.yml @@ -1,3 +1,7 @@ versions: "latest": - folder: "latest" + folder: "all" + "cci.20220923": + folder: "all" + "qt5": + folder: "all" diff --git a/recipes/runtimeqml/latest/conandata.yml b/recipes/runtimeqml/latest/conandata.yml deleted file mode 100644 index 65100af72389c..0000000000000 --- a/recipes/runtimeqml/latest/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "latest": - url: /~https://github.com/GIPdA/runtimeqml/archive/refs/heads/master.zip - sha256: "1bf2b8a6e9b9114ec94208db63a0f8de8becc2d85ca57661099d81e3122ecc47" diff --git a/recipes/runtimeqml/latest/test_package/CMakeLists.txt b/recipes/runtimeqml/latest/test_package/CMakeLists.txt deleted file mode 100644 index 724fa9d6077e2..0000000000000 --- a/recipes/runtimeqml/latest/test_package/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -project(RuntimeQmlTest LANGUAGES CXX) - -set(CMAKE_CXX_STANDARD 17) - -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -find_package(Qt6 CONFIG REQUIRED) -find_package(RuntimeQml CONFIG REQUIRED) - -add_executable(RuntimeQmlTest main.cpp qml.qrc) -target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") -target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) -set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) -set_target_properties(RuntimeQmlTest PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) -set_target_properties(RuntimeQmlTest PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) diff --git a/recipes/runtimeqml/latest/test_package/conanfile.py b/recipes/runtimeqml/latest/test_package/conanfile.py deleted file mode 100644 index 2d9d803657688..0000000000000 --- a/recipes/runtimeqml/latest/test_package/conanfile.py +++ /dev/null @@ -1,28 +0,0 @@ -from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout -import os - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires("qt/[>=6.0.0]") - self.requires("runtimeqml/latest") - - def configure(self): - self.options["qt"].qtdeclarative = True - self.options["qt"].qtshadertools = True - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - bin_path = os.path.join("bin", "RuntimeQmlTest") - self.run(bin_path, run_environment=True) diff --git a/recipes/runtimeqml/latest/test_package/main.cpp b/recipes/runtimeqml/latest/test_package/main.cpp deleted file mode 100644 index 58ebeb68363d3..0000000000000 --- a/recipes/runtimeqml/latest/test_package/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -#include - -int main(int argc, char* argv[]) { - QApplication app(argc, argv); - QQmlApplicationEngine engine; - - RuntimeQml* rt = new RuntimeQml(&engine); - rt->parseQrc(ROOT_SOURCE_PATH "/qml.qrc"); - rt->setAutoReload(true); // Reload automatically on file update - rt->load(QStringLiteral("qrc:/main.qml")); - return app.exec(); -} diff --git a/recipes/runtimeqml/latest/test_package/main.qml b/recipes/runtimeqml/latest/test_package/main.qml deleted file mode 100644 index 8205c93e49944..0000000000000 --- a/recipes/runtimeqml/latest/test_package/main.qml +++ /dev/null @@ -1,15 +0,0 @@ -import QtQuick - -Window { - visible: true - width: 640 - height: 480 - title: "Runtime Qml Test" - Rectangle { - anchors.fill: parent - Component.onCompleted: () => { - console.log("Successfully Loaded"); - Qt.quit(); - } - } -} \ No newline at end of file diff --git a/recipes/runtimeqml/latest/test_package/qml.qrc b/recipes/runtimeqml/latest/test_package/qml.qrc deleted file mode 100644 index dc7d52ff09927..0000000000000 --- a/recipes/runtimeqml/latest/test_package/qml.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - main.qml - - \ No newline at end of file From f9b638ff10dbf3afa6d9cd96ce8baf5371792b02 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Tue, 18 Oct 2022 01:50:48 -0400 Subject: [PATCH 08/20] Add back test package --- .../all/test_package/CMakeLists.txt | 20 ++++++++++++++++ .../runtimeqml/all/test_package/conanfile.py | 23 +++++++++++++++++++ recipes/runtimeqml/all/test_package/main.cpp | 12 ++++++++++ 3 files changed, 55 insertions(+) create mode 100644 recipes/runtimeqml/all/test_package/CMakeLists.txt create mode 100644 recipes/runtimeqml/all/test_package/conanfile.py create mode 100644 recipes/runtimeqml/all/test_package/main.cpp diff --git a/recipes/runtimeqml/all/test_package/CMakeLists.txt b/recipes/runtimeqml/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..30cb2e5f4a09f --- /dev/null +++ b/recipes/runtimeqml/all/test_package/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.18) + +project(RuntimeQmlTest LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +find_package(Qt6 CONFIG) +find_package(Qt5 CONFIG) +find_package(RuntimeQml CONFIG REQUIRED) + +add_executable(RuntimeQmlTest main.cpp qml.qrc) +target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) +set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) +set_target_properties(RuntimeQmlTest PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +set_target_properties(RuntimeQmlTest PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) diff --git a/recipes/runtimeqml/all/test_package/conanfile.py b/recipes/runtimeqml/all/test_package/conanfile.py new file mode 100644 index 0000000000000..21ffd15187a54 --- /dev/null +++ b/recipes/runtimeqml/all/test_package/conanfile.py @@ -0,0 +1,23 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires("qt/[>=5.0.0]") + + def configure(self): + self.options["qt"].qtdeclarative = True + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "RuntimeQmlTest") + self.run(bin_path, run_environment=True) diff --git a/recipes/runtimeqml/all/test_package/main.cpp b/recipes/runtimeqml/all/test_package/main.cpp new file mode 100644 index 0000000000000..c6ae7929a0925 --- /dev/null +++ b/recipes/runtimeqml/all/test_package/main.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include + +int main(int argc, char* argv[]) { + QApplication app(argc, argv); + QQmlApplicationEngine engine; + + RuntimeQml* rt = new RuntimeQml(&engine); + return app.exec(); +} From fd55d385e181db6ea1eec604b3fe42f3b7903659 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Tue, 18 Oct 2022 08:55:18 -0400 Subject: [PATCH 09/20] update for conan v2 --- recipes/runtimeqml/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 2be6553de445f..d10d258f8655c 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake -from conan.tools.files import get +from conan.tools.files import get, copy from conan.errors import ConanInvalidConfiguration required_conan_version = ">=1.49.0" @@ -26,7 +26,7 @@ class RuntimeQml(ConanFile): generators = "CMakeDeps", "CMakeToolchain" def export_sources(self): - self.copy("CMakeLists.txt") + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) def source(self): get(self, **self.conan_data["sources"][str(self.version)], From ea49343a382a06aff10384880e0864f6cee98b1c Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Tue, 18 Oct 2022 19:34:06 -0400 Subject: [PATCH 10/20] Remove latest and rename qt5 --- recipes/runtimeqml/all/conandata.yml | 5 +---- recipes/runtimeqml/all/conanfile.py | 6 +++--- recipes/runtimeqml/config.yml | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/recipes/runtimeqml/all/conandata.yml b/recipes/runtimeqml/all/conandata.yml index c6fa8c067bd7d..a3ea3f95e8682 100644 --- a/recipes/runtimeqml/all/conandata.yml +++ b/recipes/runtimeqml/all/conandata.yml @@ -1,10 +1,7 @@ sources: - "latest": - url: /~https://github.com/GIPdA/runtimeqml/archive/refs/heads/master.zip - sha256: "1bf2b8a6e9b9114ec94208db63a0f8de8becc2d85ca57661099d81e3122ecc47" "cci.20220923": url: /~https://github.com/GIPdA/runtimeqml/archive/3ae5dadcf6548a2e59e83c21d84fd50575df79bf.zip sha256: "18bf63ab2692e6cb8ed6e0dbfcd2390dc65769eaed43b66c4da9dd7a55598603" - "qt5": + "cci.20211220": url: /~https://github.com/GIPdA/runtimeqml/archive/ac0cbfc49ae215dd0df5ac8ecb79ca7008de5486.zip sha256: "57c6d50f0fd281c0984daae65f3559942f58d11de8ff406c150d54fd7ff0d076" diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index d10d258f8655c..96c15935ec2fb 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -33,10 +33,10 @@ def source(self): destination=self.source_folder, strip_root=True) def requirements(self): - if self.version == "qt5": - self.requires("qt/[>=5.0.0 <6.0.0]") + if self.version == "cci.20211220": # Only version which supports qt5 + self.requires("qt/5.15.5") else: - self.requires("qt/[>=6.0.0]") + self.requires("qt/6.3.1") def config_options(self): if self.settings.os == "Windows": diff --git a/recipes/runtimeqml/config.yml b/recipes/runtimeqml/config.yml index 26bfdc3f99cd2..4efb187195976 100644 --- a/recipes/runtimeqml/config.yml +++ b/recipes/runtimeqml/config.yml @@ -1,7 +1,5 @@ versions: - "latest": - folder: "all" "cci.20220923": folder: "all" - "qt5": + "cci.20211220": folder: "all" From e4ea4bfe3400d08a4e9252d6eafdf2bc22e82a77 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Tue, 18 Oct 2022 21:15:17 -0400 Subject: [PATCH 11/20] Condense test package --- recipes/runtimeqml/all/test_package/CMakeLists.txt | 2 -- recipes/runtimeqml/all/test_package/conanfile.py | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/recipes/runtimeqml/all/test_package/CMakeLists.txt b/recipes/runtimeqml/all/test_package/CMakeLists.txt index 30cb2e5f4a09f..c68472e559b31 100644 --- a/recipes/runtimeqml/all/test_package/CMakeLists.txt +++ b/recipes/runtimeqml/all/test_package/CMakeLists.txt @@ -16,5 +16,3 @@ add_executable(RuntimeQmlTest main.cpp qml.qrc) target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) -set_target_properties(RuntimeQmlTest PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) -set_target_properties(RuntimeQmlTest PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) diff --git a/recipes/runtimeqml/all/test_package/conanfile.py b/recipes/runtimeqml/all/test_package/conanfile.py index 21ffd15187a54..70b1e4b6c3d20 100644 --- a/recipes/runtimeqml/all/test_package/conanfile.py +++ b/recipes/runtimeqml/all/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake import os class TestPackageConan(ConanFile): @@ -7,11 +7,9 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "CMakeToolchain" - def requirements(self): - self.requires("qt/[>=5.0.0]") - - def configure(self): - self.options["qt"].qtdeclarative = True + default_options = { + "qt:qtdeclarative": True + } def build(self): cmake = CMake(self) From d6acfedc93a5653358c1b10d065ea4220b0a2668 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Wed, 19 Oct 2022 16:56:00 -0400 Subject: [PATCH 12/20] Change default to configure --- recipes/runtimeqml/all/test_package/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/runtimeqml/all/test_package/conanfile.py b/recipes/runtimeqml/all/test_package/conanfile.py index 70b1e4b6c3d20..84e1837556053 100644 --- a/recipes/runtimeqml/all/test_package/conanfile.py +++ b/recipes/runtimeqml/all/test_package/conanfile.py @@ -7,9 +7,9 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "CMakeToolchain" - default_options = { - "qt:qtdeclarative": True - } + def configure(self): + qt = self.dependencies["qt"] + qt.options.qtdeclarative = True def build(self): cmake = CMake(self) From c74bf2a5fd7c049862b4c4aff919f23fee7aae5b Mon Sep 17 00:00:00 2001 From: Dallas Hart <36043275+Nomalah@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:44:37 -0400 Subject: [PATCH 13/20] Apply suggestions from code review Co-authored-by: Uilian Ries --- recipes/runtimeqml/all/CMakeLists.txt | 11 ++++ recipes/runtimeqml/all/conanfile.py | 65 +++++++++++++------ .../all/test_package/CMakeLists.txt | 22 ++----- .../runtimeqml/all/test_package/conanfile.py | 21 +++--- 4 files changed, 76 insertions(+), 43 deletions(-) diff --git a/recipes/runtimeqml/all/CMakeLists.txt b/recipes/runtimeqml/all/CMakeLists.txt index ae4836bfd440c..eab75fb1d6671 100644 --- a/recipes/runtimeqml/all/CMakeLists.txt +++ b/recipes/runtimeqml/all/CMakeLists.txt @@ -7,6 +7,9 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") find_package(Qt5 CONFIG) find_package(Qt6 CONFIG) @@ -22,4 +25,12 @@ target_link_libraries(${PROJECT_NAME} PRIVATE qt::qt) set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}" C_VISIBILITY_PRESET hidden) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + +include(GNUInstallDirs) +install(TARGETS ${PROJECT_NAME} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 96c15935ec2fb..5b812849481be 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import CMake +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import get, copy from conan.errors import ConanInvalidConfiguration @@ -23,34 +23,65 @@ class RuntimeQml(ConanFile): "fPIC": True } - generators = "CMakeDeps", "CMakeToolchain" + @property + def _minimum_cpp_standard(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + } def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - def source(self): - get(self, **self.conan_data["sources"][str(self.version)], - destination=self.source_folder, strip_root=True) - - def requirements(self): - if self.version == "cci.20211220": # Only version which supports qt5 - self.requires("qt/5.15.5") - else: - self.requires("qt/6.3.1") - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + try: + del self.options.fPIC + except Exception: + pass + + def layout(self): + cmake_layout(self) + + def requirements(self): + if Version(self.version) <= "cci.20211220" + self.requires("qt/5.15.5") + else: + self.requires("qt/6.3.1") def validate(self): + if self.info.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + check_min_vs(self, 191) + if not is_msvc(self): + minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) + if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._minimum_cpp_standard}, which your compiler does not support." + ) qt = self.dependencies["qt"] if not qt.options.qtdeclarative: raise ConanInvalidConfiguration(f"{self.ref} requires option qt:qtdeclarative=True") + def source(self): + get(self, **self.conan_data["sources"][str(self.version)], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() @@ -59,12 +90,8 @@ def build(self): def package(self): self.copy(pattern="LICENSE", src=self.source_folder, dst="licenses", keep_path=False) - self.copy(pattern="*.lib", dst="lib", keep_path=False) - self.copy(pattern="*.dylib", dst="lib", keep_path=False) - self.copy(pattern="*.so", dst="lib", keep_path=False) - self.copy(pattern="*.dll", dst="bin", keep_path=False) - self.copy(pattern="*.h*", src=self.source_folder, - dst="include", keep_path=False) + cmake = CMake(self) + cmake.install() def package_info(self): self.cpp_info.libs = ["runtimeqml"] diff --git a/recipes/runtimeqml/all/test_package/CMakeLists.txt b/recipes/runtimeqml/all/test_package/CMakeLists.txt index c68472e559b31..cbf1fd2a3aeac 100644 --- a/recipes/runtimeqml/all/test_package/CMakeLists.txt +++ b/recipes/runtimeqml/all/test_package/CMakeLists.txt @@ -1,18 +1,8 @@ -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.8) +project(test_package CXX) -project(RuntimeQmlTest LANGUAGES CXX) +find_package(package REQUIRED CONFIG) -set(CMAKE_CXX_STANDARD 17) - -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -find_package(Qt6 CONFIG) -find_package(Qt5 CONFIG) -find_package(RuntimeQml CONFIG REQUIRED) - -add_executable(RuntimeQmlTest main.cpp qml.qrc) -target_compile_definitions(RuntimeQmlTest PRIVATE ROOT_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") -target_link_libraries(RuntimeQmlTest PRIVATE qt::qt runtimeqml::runtimeqml) -set_target_properties(RuntimeQmlTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE runtimeqml::runtimeqml) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/runtimeqml/all/test_package/conanfile.py b/recipes/runtimeqml/all/test_package/conanfile.py index 84e1837556053..a9fb96656f203 100644 --- a/recipes/runtimeqml/all/test_package/conanfile.py +++ b/recipes/runtimeqml/all/test_package/conanfile.py @@ -1,21 +1,26 @@ from conan import ConanFile -from conan.tools.cmake import CMake +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" - generators = "CMakeDeps", "CMakeToolchain" + def requirements(self): + self.requires(self.tested_reference_str) - def configure(self): - qt = self.dependencies["qt"] - qt.options.qtdeclarative = True + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) cmake.configure() cmake.build() - + def test(self): - bin_path = os.path.join("bin", "RuntimeQmlTest") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") From 4f0fb235660013c15c338215f2bbceed3f41e3dd Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Thu, 20 Oct 2022 10:10:08 -0400 Subject: [PATCH 14/20] Fix missing things from files --- recipes/runtimeqml/all/CMakeLists.txt | 5 +---- recipes/runtimeqml/all/conanfile.py | 7 +++++-- recipes/runtimeqml/all/test_package/CMakeLists.txt | 2 +- .../all/test_package/{main.cpp => test_package.cpp} | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename recipes/runtimeqml/all/test_package/{main.cpp => test_package.cpp} (100%) diff --git a/recipes/runtimeqml/all/CMakeLists.txt b/recipes/runtimeqml/all/CMakeLists.txt index eab75fb1d6671..fd05bb5fd0224 100644 --- a/recipes/runtimeqml/all/CMakeLists.txt +++ b/recipes/runtimeqml/all/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.21.1) project(runtimeqml LANGUAGES CXX) @@ -22,9 +22,6 @@ else() endif() target_link_libraries(${PROJECT_NAME} PRIVATE qt::qt) -set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<0:>) -set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) -set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<0:>) set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}" C_VISIBILITY_PRESET hidden) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 5b812849481be..dcb04fefb0028 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -1,9 +1,12 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version from conan.tools.files import get, copy from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.49.0" +required_conan_version = ">=1.50.0" class RuntimeQml(ConanFile): name = "runtimeqml" @@ -53,7 +56,7 @@ def layout(self): cmake_layout(self) def requirements(self): - if Version(self.version) <= "cci.20211220" + if Version(self.version) <= "cci.20211220": self.requires("qt/5.15.5") else: self.requires("qt/6.3.1") diff --git a/recipes/runtimeqml/all/test_package/CMakeLists.txt b/recipes/runtimeqml/all/test_package/CMakeLists.txt index cbf1fd2a3aeac..4cbc9eb8da5ee 100644 --- a/recipes/runtimeqml/all/test_package/CMakeLists.txt +++ b/recipes/runtimeqml/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package CXX) find_package(package REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE runtimeqml::runtimeqml) +target_link_libraries(${PROJECT_NAME} PRIVATE runtimeqml::runtimeqml qt::qt) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/runtimeqml/all/test_package/main.cpp b/recipes/runtimeqml/all/test_package/test_package.cpp similarity index 100% rename from recipes/runtimeqml/all/test_package/main.cpp rename to recipes/runtimeqml/all/test_package/test_package.cpp From ed11c7d742015bfcab696813d0436db3dd9b55d1 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Wed, 26 Oct 2022 16:27:52 -0400 Subject: [PATCH 15/20] Add test_v1_package --- recipes/runtimeqml/all/CMakeLists.txt | 2 +- recipes/runtimeqml/all/conanfile.py | 1 + .../runtimeqml/all/test_package/CMakeLists.txt | 4 ++-- .../runtimeqml/all/test_package/conanfile.py | 1 - .../all/test_v1_package/CMakeLists.txt | 8 ++++++++ .../all/test_v1_package/conanfile.py | 18 ++++++++++++++++++ 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 recipes/runtimeqml/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/runtimeqml/all/test_v1_package/conanfile.py diff --git a/recipes/runtimeqml/all/CMakeLists.txt b/recipes/runtimeqml/all/CMakeLists.txt index fd05bb5fd0224..925eb729e96c5 100644 --- a/recipes/runtimeqml/all/CMakeLists.txt +++ b/recipes/runtimeqml/all/CMakeLists.txt @@ -21,7 +21,7 @@ else() message(FATAL_ERROR "Qt was not found") endif() -target_link_libraries(${PROJECT_NAME} PRIVATE qt::qt) +target_link_libraries(${PROJECT_NAME} PUBLIC qt::qt) set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}" C_VISIBILITY_PRESET hidden) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index dcb04fefb0028..2b83f9becfcec 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -51,6 +51,7 @@ def configure(self): del self.options.fPIC except Exception: pass + self.options["qt"].qtdeclarative = True def layout(self): cmake_layout(self) diff --git a/recipes/runtimeqml/all/test_package/CMakeLists.txt b/recipes/runtimeqml/all/test_package/CMakeLists.txt index 4cbc9eb8da5ee..0abdc1edf18c8 100644 --- a/recipes/runtimeqml/all/test_package/CMakeLists.txt +++ b/recipes/runtimeqml/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.8) project(test_package CXX) -find_package(package REQUIRED CONFIG) +find_package(runtimeqml REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE runtimeqml::runtimeqml qt::qt) +target_link_libraries(${PROJECT_NAME} PRIVATE runtimeqml::runtimeqml) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/runtimeqml/all/test_package/conanfile.py b/recipes/runtimeqml/all/test_package/conanfile.py index a9fb96656f203..a9fbb7f543162 100644 --- a/recipes/runtimeqml/all/test_package/conanfile.py +++ b/recipes/runtimeqml/all/test_package/conanfile.py @@ -3,7 +3,6 @@ from conan.tools.cmake import cmake_layout, CMake import os - class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" diff --git a/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt b/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..a362a729e6b5a --- /dev/null +++ b/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) \ No newline at end of file diff --git a/recipes/runtimeqml/all/test_v1_package/conanfile.py b/recipes/runtimeqml/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..87c0c08135805 --- /dev/null +++ b/recipes/runtimeqml/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") From 776753ba0d20fd28931c378e18a36fc7ae6cfd24 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Wed, 26 Oct 2022 19:20:53 -0400 Subject: [PATCH 16/20] Lint fixing --- recipes/runtimeqml/all/test_v1_package/CMakeLists.txt | 2 +- recipes/runtimeqml/all/test_v1_package/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt b/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt index a362a729e6b5a..925ecbe19e448 100644 --- a/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt +++ b/recipes/runtimeqml/all/test_v1_package/CMakeLists.txt @@ -5,4 +5,4 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) \ No newline at end of file + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/runtimeqml/all/test_v1_package/conanfile.py b/recipes/runtimeqml/all/test_v1_package/conanfile.py index 87c0c08135805..f44ea85fbe3eb 100644 --- a/recipes/runtimeqml/all/test_v1_package/conanfile.py +++ b/recipes/runtimeqml/all/test_v1_package/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.build import cross_building -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import CMake import os class TestPackageConan(ConanFile): From 85cb77f9801b5e806c2b21616935f09cb3059b43 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Thu, 27 Oct 2022 07:41:18 -0400 Subject: [PATCH 17/20] Remove options set as advised --- recipes/runtimeqml/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 2b83f9becfcec..dcb04fefb0028 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -51,7 +51,6 @@ def configure(self): del self.options.fPIC except Exception: pass - self.options["qt"].qtdeclarative = True def layout(self): cmake_layout(self) From 0a0be1167c0ac87b963dedabfd6f79216906d3f3 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Fri, 28 Oct 2022 12:20:02 -0400 Subject: [PATCH 18/20] Format & adjust from review --- recipes/runtimeqml/all/CMakeLists.txt | 3 ++- recipes/runtimeqml/all/conanfile.py | 16 ++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/recipes/runtimeqml/all/CMakeLists.txt b/recipes/runtimeqml/all/CMakeLists.txt index 925eb729e96c5..36a7ff24d11b8 100644 --- a/recipes/runtimeqml/all/CMakeLists.txt +++ b/recipes/runtimeqml/all/CMakeLists.txt @@ -9,13 +9,14 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") find_package(Qt5 CONFIG) find_package(Qt6 CONFIG) if (Qt6_FOUND) + set(HEADERS runtimeqml.hpp) add_library(${PROJECT_NAME} runtimeqml.hpp runtimeqml.cpp) elseif(Qt5_FOUND) + set(HEADERS runtimeqml.h) add_library(${PROJECT_NAME} runtimeqml.h runtimeqml.cpp) else() message(FATAL_ERROR "Qt was not found") diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index dcb04fefb0028..14f1f8095c5e7 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -8,6 +8,7 @@ required_conan_version = ">=1.50.0" + class RuntimeQml(ConanFile): name = "runtimeqml" homepage = "/~https://github.com/GIPdA/runtimeqml" @@ -39,7 +40,8 @@ def _compilers_minimum_version(self): } def export_sources(self): - copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + copy(self, "CMakeLists.txt", self.recipe_folder, + self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -54,7 +56,7 @@ def configure(self): def layout(self): cmake_layout(self) - + def requirements(self): if Version(self.version) <= "cci.20211220": self.requires("qt/5.15.5") @@ -66,14 +68,16 @@ def validate(self): check_min_cppstd(self, self._minimum_cpp_standard) check_min_vs(self, 191) if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) + minimum_version = self._compilers_minimum_version.get( + str(self.info.settings.compiler), False) if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._minimum_cpp_standard}, which your compiler does not support." ) qt = self.dependencies["qt"] if not qt.options.qtdeclarative: - raise ConanInvalidConfiguration(f"{self.ref} requires option qt:qtdeclarative=True") + raise ConanInvalidConfiguration( + f"{self.ref} requires option qt:qtdeclarative=True") def source(self): get(self, **self.conan_data["sources"][str(self.version)], @@ -91,8 +95,8 @@ def build(self): cmake.build() def package(self): - self.copy(pattern="LICENSE", src=self.source_folder, - dst="licenses", keep_path=False) + copy(self, pattern="LICENSE", src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), keep_path=False) cmake = CMake(self) cmake.install() From eb4070188a8600c02a3337552f8a54ab02bc05d9 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Fri, 28 Oct 2022 12:21:02 -0400 Subject: [PATCH 19/20] remove dynamically allocated in test --- recipes/runtimeqml/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/runtimeqml/all/test_package/test_package.cpp b/recipes/runtimeqml/all/test_package/test_package.cpp index c6ae7929a0925..091aa9a194536 100644 --- a/recipes/runtimeqml/all/test_package/test_package.cpp +++ b/recipes/runtimeqml/all/test_package/test_package.cpp @@ -7,6 +7,6 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); QQmlApplicationEngine engine; - RuntimeQml* rt = new RuntimeQml(&engine); + RuntimeQml rt{ &engine }; return app.exec(); } From 3999a6ec5b969c335db620ba4f01a373fb926e31 Mon Sep 17 00:00:00 2001 From: Dallas Hart Date: Fri, 28 Oct 2022 14:22:25 -0400 Subject: [PATCH 20/20] Add missing import --- recipes/runtimeqml/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 14f1f8095c5e7..8ed18efdf54c9 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.scm import Version from conan.tools.files import get, copy from conan.errors import ConanInvalidConfiguration +import os required_conan_version = ">=1.50.0"