conanfile.py 711 B

123456789101112131415161718192021222324
  1. from conans import ConanFile, CMake, tools
  2. class CbloscTestConan(ConanFile):
  3. settings = "os", "compiler", "build_type", "arch"
  4. generators = "cmake"
  5. def build(self):
  6. cmake = CMake(self)
  7. cmake.configure()
  8. cmake.build()
  9. def imports(self):
  10. self.copy("*.dll", dst="bin", src="bin" )
  11. self.copy("*.dylib*", dst="bin", src="lib")
  12. self.copy("*.so*", dst="bin", src="lib")
  13. def test(self):
  14. with tools.chdir("bin"):
  15. if tools.os_info.is_windows:
  16. self.run("example")
  17. else:
  18. prefix = "DYLD_LIBRARY_PATH=." if tools.os_info.is_macos else ""
  19. self.run("%s ./example" % prefix)