conanfile.py
Go to the documentation of this file.
1 from conans import ConanFile, CMake, tools, RunEnvironment
2 import os
3 
4 
5 class TestPackageConan(ConanFile):
6  settings = "os", "compiler", "build_type", "arch"
7  generators = "cmake"
8 
9  def build(self):
10  cmake = CMake(self)
11  cmake.configure()
12  cmake.build()
13 
14  def imports(self):
15  self.copy("*paho*.dll", dst="bin", src="bin")
16  self.copy("*paho*.dylib*", dst="bin", src="lib")
17 
18  def test(self):
19  with tools.environment_append(RunEnvironment(self).vars):
20  bin_path = os.path.join("bin", "test_package")
21  if self.settings.os == "Windows":
22  self.run(bin_path)
23  elif self.settings.os == "Macos":
24  self.run("DYLD_LIBRARY_PATH=%s %s" % (os.environ.get('DYLD_LIBRARY_PATH', ''), bin_path))
25  else:
26  self.run("LD_LIBRARY_PATH=%s %s" % (os.environ.get('LD_LIBRARY_PATH', ''), bin_path))


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:33