• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import os
2
3from conans import ConanFile, CMake, tools
4
5
6class FruitTestConan(ConanFile):
7    settings = "os", "compiler", "build_type", "arch"
8    generators = "cmake"
9
10    def build(self):
11        cmake = CMake(self)
12        # Current dir is "test_package/build/<build_id>" and CMakeLists.txt is
13        # in "test_package"
14        cmake.configure()
15        cmake.build()
16
17    def imports(self):
18        self.copy("*.dll", dst="bin", src="bin")
19        self.copy("*.dylib*", dst="bin", src="lib")
20        self.copy('*.so*', dst='bin', src='lib')
21
22    def test(self):
23        if not tools.cross_building(self.settings):
24            os.chdir("bin")
25            self.run(".%sexample" % os.sep)
26