Updates conan recipe and test_package

This commit is contained in:
danimtb 2018-02-01 16:35:47 +01:00
parent be53cebcd3
commit dfe28ab87d
2 changed files with 8 additions and 12 deletions

View File

@ -3,18 +3,15 @@ from conans import ConanFile
class GlmConan(ConanFile): class GlmConan(ConanFile):
name = "glm" name = "glm"
version = "master" version = "0.9.8.5"
generators = "txt" generators = "txt"
url="https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm"
description="OpenGL Mathematics (GLM)" description = "OpenGL Mathematics (GLM)"
license = "https://github.com/g-truc/glm/blob/manual/copying.txt" license = "The Happy Bunny License (Modified MIT License)"
exports_sources = ["FindGLM.cmake", os.sep.join(["..", "..", "glm*"])] exports_sources = ["FindGLM.cmake", os.sep.join(["..", "..", "glm*"])]
exports = "lib_licenses/*" exports = "lib_licenses/*"
def build(self):
self.output.info("No compilation necessary for GLM")
def package(self): def package(self):
self.copy("FindGLM.cmake", ".", ".") self.copy("FindGLM.cmake", ".", ".")
self.copy("*", src="glm", dst=os.sep.join([".", "include", "glm"])) self.copy("*", src="glm", dst=os.sep.join([".", "include", "glm"]))
self.copy("lib_licenses/license*", dst="licenses", ignore_case=True, keep_path=False) self.copy("lib_licenses/license*", dst="licenses", ignore_case=True, keep_path=False)

View File

@ -7,9 +7,8 @@ class TestGlm(ConanFile):
def build(self): def build(self):
cmake = CMake(self) cmake = CMake(self)
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line)) cmake.configure()
self.run("cmake --build . %s" % cmake.build_config) cmake.build()
def test(self): def test(self):
self.run(os.sep.join([".","bin", "testGlm"])) self.run(os.sep.join([".", "bin", "testGlm"]))