glew-cmake/build/conan/test_package/conanfile.py

25 lines
811 B
Python
Raw Normal View History

2017-06-25 18:15:34 +00:00
from conans import ConanFile, CMake
import os
channel = os.getenv("CONAN_CHANNEL", "testing")
2017-06-25 19:41:28 +00:00
username = os.getenv("CONAN_USERNAME", "nigels-com")
2017-06-25 18:15:34 +00:00
class TestGlew(ConanFile):
settings = "os", "compiler", "build_type", "arch"
2017-06-25 19:41:28 +00:00
requires = "glew/master@%s/%s" % (username, channel)
2017-06-25 18:15:34 +00:00
generators = "cmake"
def build(self):
cmake = CMake(self)
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
self.run("cmake --build . %s" % cmake.build_config)
def test(self):
self.run(os.sep.join([".","bin", "testGlew"]))
def imports(self):
if self.settings.os == "Windows":
self.copy(pattern="*.dll", dst="bin", src="bin")
if self.settings.os == "Macos":
self.copy(pattern="*.dylib", dst="bin", src="lib")