using a conanfile.py to call meson
This commit is contained in:
parent
3e21336c78
commit
7fab978ae7
3 changed files with 34 additions and 15 deletions
10
README.md
10
README.md
|
@ -12,14 +12,12 @@ conan profile detect --force
|
||||||
```
|
```
|
||||||
* Install dependencies with conan
|
* Install dependencies with conan
|
||||||
```
|
```
|
||||||
conan install . --output-folder=build --build=missing
|
conan install . --build=missing
|
||||||
conan install . --output-folder=build_debug --build=missing --profile=debug
|
conan install . --build=missing --profile=debug
|
||||||
```
|
```
|
||||||
* Build with meson
|
* Build with meson
|
||||||
```
|
```
|
||||||
cd build
|
cd build
|
||||||
source conanbuild.sh
|
conan build .
|
||||||
meson setup --native-file conan_meson_native.ini .. meson-src
|
conan build . --profile=debug
|
||||||
meson compile -C meson-src
|
|
||||||
source deactivate_conanbuild.sh
|
|
||||||
```
|
```
|
||||||
|
|
30
conanfile.py
Normal file
30
conanfile.py
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
from conan import ConanFile
|
||||||
|
from conan.tools.meson import Meson
|
||||||
|
|
||||||
|
class ElemmireRecipe(ConanFile):
|
||||||
|
name = "Elemmire"
|
||||||
|
version = "0.1"
|
||||||
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "PkgConfigDeps", "MesonToolchain"
|
||||||
|
exports_sources = "src/*"
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
self.requires("fftw/[~3.3]")
|
||||||
|
|
||||||
|
def build_requirements(self):
|
||||||
|
self.tool_requires("meson/[~1.0]")
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
import os.path
|
||||||
|
from conan.tools.layout import basic_layout
|
||||||
|
basic_layout(self)
|
||||||
|
self.folders.build = os.path.join(self.folders.build, "meson")
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
meson = Meson(self)
|
||||||
|
meson.configure()
|
||||||
|
meson.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
meson = Meson(self)
|
||||||
|
meson.install()
|
|
@ -1,9 +0,0 @@
|
||||||
[requires]
|
|
||||||
fftw/3.3.9
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
meson/1.0.0
|
|
||||||
|
|
||||||
[generators]
|
|
||||||
PkgConfigDeps
|
|
||||||
MesonToolchain
|
|
Loading…
Add table
Reference in a new issue