فهرست منبع

Modifications suggested by conan team.

dimitri 8 سال پیش
والد
کامیت
bb63aa9e9b

+ 2 - 1
util/conan-package/.gitignore

@@ -15,4 +15,5 @@ test_package/build
 conanfile.pyc
 conaninfo.txt
 conanbuildinfo.txt
-conanbuildinfo.cmake
+conanbuildinfo.cmake
+!FindGLM.cmake

+ 10 - 0
util/conan-package/FindGLM.cmake

@@ -0,0 +1,10 @@
+FIND_PATH(
+  GLM_INCLUDE_DIR
+  NAMES
+  glm
+  PATHS
+  include)
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLM REQUIRED_VARS GLM_INCLUDE_DIR)

+ 3 - 3
util/conan-package/conanfile.py

@@ -8,11 +8,11 @@ class GlmConan(ConanFile):
     url="https://github.com/g-truc/glm"
     description="OpenGL Mathematics (GLM)"
     license = "https://github.com/g-truc/glm/blob/manual/copying.txt"
-    exports = ["FindGLM.cmake", "lib_licenses/*", os.sep.join([".", "..", "..", "*"])]
+    exports_sources = ["FindGLM.cmake", os.sep.join([".", "..", "..", "*"])]
+    exports = "lib_licenses/*"
 
     def build(self):
-        self.output.warn("No compilation necessary for GLM")
-        self.output.warn(os.sep.join([".", "..", "..", "*"]))
+        self.output.info("No compilation necessary for GLM")
 
     def package(self):
         self.copy("FindGLM.cmake", ".", ".")

+ 0 - 4
util/conan-package/test_package/conanfile.py

@@ -1,12 +1,8 @@
 from conans import ConanFile, CMake
 import os
 
-channel = os.getenv("CONAN_CHANNEL", "testing")
-username = os.getenv("CONAN_USERNAME", "g-truc")
-
 class TestGlm(ConanFile):
     settings = "os", "compiler", "build_type", "arch"
-    requires = "glm/master@%s/%s" % (username, channel)
     generators = "cmake"
 
     def build(self):