[DO-1345] fixed windows packages (!16)
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/16 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
committed by
Aleksandr Vodyanov
parent
3759e1163f
commit
a82e89a1bc
29
recipes/meson/all/test_package/conanfile.py
Normal file
29
recipes/meson/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.tools.build import can_run
|
||||
from conan.tools.layout import basic_layout
|
||||
from conan.tools.meson import Meson
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "MesonToolchain", "VirtualBuildEnv", "VirtualRunEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
|
||||
def layout(self):
|
||||
basic_layout(self)
|
||||
|
||||
def build(self):
|
||||
meson = Meson(self)
|
||||
meson.configure()
|
||||
meson.build()
|
||||
|
||||
def test(self):
|
||||
self.run("meson --version")
|
||||
if can_run(self):
|
||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
2
recipes/meson/all/test_package/meson.build
Normal file
2
recipes/meson/all/test_package/meson.build
Normal file
@@ -0,0 +1,2 @@
|
||||
project('test_package', 'cpp')
|
||||
executable('test_package', 'test_package.cpp')
|
||||
6
recipes/meson/all/test_package/test_package.cpp
Normal file
6
recipes/meson/all/test_package/test_package.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello from Meson.\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user