Read environment variable directly from conanfile.py.

This commit is contained in:
Roman Telezhynskyi 2023-02-20 21:45:02 +02:00
parent 824d978473
commit 1e6179e69d
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,5 @@
import os
from conans import ConanFile
class Recipe(ConanFile):
@ -8,3 +10,6 @@ class Recipe(ConanFile):
def configure(self):
if self.settings.os == "Linux":
self.options["xerces-c"].shared = False
if self.settings.os == "Macos" and "MACOS_DEPLOYMENT_TARGET" in os.environ:
self.settings.os.version = os.environ["MACOS_DEPLOYMENT_TARGET"]

View File

@ -12,11 +12,6 @@ Project {
condition: enableConan
conanfilePath: project.sourceDirectory + "/conanfile.py"
verbose: true
settings: {
if (qbs.targetOS.contains("macos") && project.minimumMacosVersion !== undefined)
return ({"os.version": project.minimumMacosVersion});
return undefined;
}
}
references: [