瀏覽代碼

Download and unpack library source files

DarkMorford 5 年之前
父節點
當前提交
0e900c123b
共有 2 個文件被更改,包括 11 次插入8 次删除
  1. 4 0
      conandata.yml
  2. 7 8
      conanfile.py

+ 4 - 0
conandata.yml

@@ -0,0 +1,4 @@
+sources:
+  1.3.4:
+    url: "http://downloads.xiph.org/releases/ogg/libogg-1.3.4.tar.gz"
+    sha256: "fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e"

+ 7 - 8
conanfile.py

@@ -1,4 +1,5 @@
 from conans import ConanFile, CMake, tools
+import os
 
 
 class LibOggConan(ConanFile):
@@ -17,17 +18,15 @@ class LibOggConan(ConanFile):
     default_options = {"shared": False}
     generators = "cmake"
 
+    @property
+    def subfolder(self):
+        return os.path.join(self.source_folder, f"libogg-{self.version}")
+
     def source(self):
-        self.run("git clone https://github.com/conan-io/hello.git")
-        # This small hack might be useful to guarantee proper /MT /MD linkage
-        # in MSVC if the packaged project doesn't have variables to set it
-        # properly
-        tools.replace_in_file("hello/CMakeLists.txt", "PROJECT(HelloWorld)",
-                              '''PROJECT(HelloWorld)
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup()''')
+        tools.get(**self.conan_data["sources"][self.version])
 
     def configure(self):
+        del self.settings.compiler.cppstd
         del self.settings.compiler.libcxx
 
     def build(self):