Switch to conanfile.py.

This commit is contained in:
Roman Telezhynskyi 2023-02-20 16:40:38 +02:00
parent 1285f85dbc
commit f3899ac072
3 changed files with 11 additions and 9 deletions

10
conanfile.py Normal file
View File

@ -0,0 +1,10 @@
from conans import ConanFile
class Recipe(ConanFile):
settings = "os"
requires = "xerces-c/[>=3.2,<4.0]"
default_options = {"xerces-c:shared": True}
def configure(self):
if self.settings.os == "Linux":
self.options["xerces-c"].shared = False

View File

@ -1,8 +0,0 @@
[requires]
xerces-c/[>=3.2,<4.0]
[options]
xerces-c:shared=True
[options.linux.xerces-c]
shared=False

View File

@ -10,7 +10,7 @@ Project {
Probes.ConanfileProbe { Probes.ConanfileProbe {
id: thirdPartyConanPackages id: thirdPartyConanPackages
condition: enableConan condition: enableConan
conanfilePath: project.sourceDirectory + "/conanfile.txt" conanfilePath: project.sourceDirectory + "/conanfile.py"
settings: { settings: {
if (qbs.targetOS.contains("macos") && project.minimumMacosVersion !== undefined) if (qbs.targetOS.contains("macos") && project.minimumMacosVersion !== undefined)
return ({"os.version": project.minimumMacosVersion}); return ({"os.version": project.minimumMacosVersion});