46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
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"]
|