Init conan + meson project

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2025-11-15 12:48:45 +01:00
parent 984359e5f0
commit 4aa1a38ba3
8 changed files with 235 additions and 0 deletions

45
conanfile.py Normal file
View File

@@ -0,0 +1,45 @@
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
class daw_expConan(ConanFile):
name = "daw-exp"
version = "1.0"
package_type = "library"
# Binary configuration
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)
def generate(self):
tc = MesonToolchain(self)
tc.generate()
def build(self):
meson = Meson(self)
meson.configure()
meson.build()
def package(self):
meson = Meson(self)
meson.install()
def package_info(self):
self.cpp_info.libs = ["daw-exp"]