added MesonToolchain in recipe
This commit is contained in:
parent
ec70626be3
commit
956aed934f
2 changed files with 8 additions and 6 deletions
|
@ -21,13 +21,11 @@ conan profile detect --force
|
||||||
```
|
```
|
||||||
* Build with meson
|
* Build with meson
|
||||||
```
|
```
|
||||||
cd build-realease
|
cd build-release ; conan build .. ; cd ..
|
||||||
conan build ..
|
|
||||||
```
|
```
|
||||||
or for the debug version:
|
or for the debug version:
|
||||||
```
|
```
|
||||||
cd build-debug
|
cd build-debug ; conan build .. --profile=debug ; cd ..
|
||||||
conan build .. --profile=debug
|
|
||||||
```
|
```
|
||||||
* To create the package (i.e. build and install it in the conan cache ``~/.conan2``):
|
* To create the package (i.e. build and install it in the conan cache ``~/.conan2``):
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os.path
|
import os.path
|
||||||
from conan import ConanFile
|
from conan import ConanFile
|
||||||
from conan.tools.meson import Meson
|
from conan.tools.meson import Meson, MesonToolchain
|
||||||
from conan.tools.layout import basic_layout
|
from conan.tools.layout import basic_layout
|
||||||
|
|
||||||
class ElemmireRecipe(ConanFile):
|
class ElemmireRecipe(ConanFile):
|
||||||
|
@ -15,7 +15,7 @@ class ElemmireRecipe(ConanFile):
|
||||||
topics = ("cosmology", "data analysis")
|
topics = ("cosmology", "data analysis")
|
||||||
|
|
||||||
# Binary configuration
|
# Binary configuration
|
||||||
generators = "PkgConfigDeps", "MesonToolchain"
|
generators = "PkgConfigDeps"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
options = {"shared": [True, False], "fPIC": [True, False]}
|
options = {"shared": [True, False], "fPIC": [True, False]}
|
||||||
default_options = {"shared": False, "fPIC": True}
|
default_options = {"shared": False, "fPIC": True}
|
||||||
|
@ -33,6 +33,10 @@ class ElemmireRecipe(ConanFile):
|
||||||
basic_layout(self)
|
basic_layout(self)
|
||||||
self.folders.build = os.path.join(self.folders.build, "meson")
|
self.folders.build = os.path.join(self.folders.build, "meson")
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
tc = MesonToolchain(self)
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
meson = Meson(self)
|
meson = Meson(self)
|
||||||
meson.configure()
|
meson.configure()
|
||||||
|
|
Loading…
Add table
Reference in a new issue