From bbdb7503624635486bcc7378584a685c23aa70c6 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 19 Sep 2024 17:02:30 -0600 Subject: [PATCH] build: `package_type` is dynamically set in conanfile.py depending if we build modules or not --- conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index f4519c588..266a8accc 100644 --- a/conanfile.py +++ b/conanfile.py @@ -82,7 +82,6 @@ class MPUnitsConan(ConanFile): "example/*", "CMakeLists.txt", ) - package_type = "header-library" no_copy_source = True @property @@ -204,6 +203,10 @@ def config_options(self): self._set_default_option(key) def configure(self): + if self.options.cxx_modules: + self.package_type = "static-library" + else: + self.package_type = "header-library" if self.options.freestanding: self.options.rm_safe("std_format")