valentina/conanfile.py

31 lines
811 B
Python
Raw Normal View History

import os
2023-02-24 13:36:40 +01:00
from conan import ConanFile
2023-02-20 15:40:38 +01:00
class Recipe(ConanFile):
settings = "os"
requires = "xerces-c/[~3.2]", "sentry-crashpad/0.6.5"
2024-03-12 15:39:44 +01:00
options = {
"with_xerces": [True, False],
"with_crash_reporting": [True, False]
}
default_options = {
"xerces-c/*:shared": True,
"with_xerces": False,
"with_crash_reporting": False
}
2023-02-20 15:40:38 +01:00
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"]
2024-03-12 15:39:44 +01:00
def requirements(self):
if not self.options.with_xerces:
2024-03-25 14:43:21 +01:00
del self.requires["xerces-c"]
2024-03-12 15:39:44 +01:00
if not self.options.with_crash_reporting:
2024-03-25 14:43:21 +01:00
del self.requires["sentry-crashpad"]