Change the conanfile

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2025-11-16 20:55:28 +01:00
parent 4aa1a38ba3
commit f6586bef83
8 changed files with 81 additions and 63 deletions

View File

@@ -1,34 +1,24 @@
import os
from conan import ConanFile
from conan.tools.meson import MesonToolchain, Meson
from conan.tools.layout import basic_layout
from conan.tools.files import copy
from conan.tools.gnu import PkgConfigDeps
class daw_expConan(ConanFile):
name = "daw-exp"
version = "1.0"
package_type = "library"
# Binary configuration
class daw_projectConan(ConanFile):
name = "daw-project"
version = "0.0.1"
package_type = "application"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "meson.build", "src/*"
def config_options(self):
if self.settings.os == "Windows":
self.options.rm_safe("fPIC")
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
def layout(self):
basic_layout(self)
self.folders.build = "build"
self.folders.generators = "build/scripts"
def generate(self):
deps = PkgConfigDeps(self)
deps.generate()
tc = MesonToolchain(self)
tc.generate()
@@ -40,6 +30,3 @@ class daw_expConan(ConanFile):
def package(self):
meson = Meson(self)
meson.install()
def package_info(self):
self.cpp_info.libs = ["daw-exp"]