diff options
-rw-r--r-- | conanfile.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/conanfile.py b/conanfile.py index 43e9f357..3b66c2ea 100644 --- a/conanfile.py +++ b/conanfile.py @@ -43,9 +43,9 @@ class QtDataVisualization(ConanFile): description = "Qt Data Visualization provides UI Components for displaying 3D graphs, driven by static or dynamic data models." topics = ("qt", "qt6", "data visualization", "qtquick") settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], + options = {"shared": [True, False, "default"], "qt6": "ANY"} # this is needed to model unique package_id for the Add-on build per used Qt6 version - default_options = {"shared": False, + default_options = {"shared": "default", # default: Use the value of the Qt build "qt6": None} exports_sources = "*", "!conan*.*" @@ -87,6 +87,10 @@ class QtDataVisualization(ConanFile): install_dir = os.path.join(os.getcwd(), "_install_tmp") cmake.definitions["CMAKE_INSTALL_PREFIX"] = install_dir + # Use the value of the Qt build + if self.options.shared.value == "default": + del cmake.definitions["BUILD_SHARED_LIBS"] + cmake_toolchain_file = os.environ.get("CMAKE_TOOLCHAIN_FILE") if cmake_toolchain_file: cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = cmake_toolchain_file |