1from conans import ConanFile, CMake 2import os 3 4class KArchiveTestConan(ConanFile): 5 settings = "os", "compiler", "build_type", "arch" 6 generators = "cmake" 7 8 def build(self): 9 cmake = CMake(self) 10 # Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package" 11 cmake.configure(source_dir=self.conanfile_directory, build_dir="./") 12 cmake.build() 13 14 def imports(self): 15 self.copy("*.dll", dst="bin", src="bin") 16 self.copy("*.dylib*", dst="bin", src="lib") 17 18 def test(self): 19 os.chdir("bin") 20 self.run(".%sexample" % os.sep) 21