DarkMorford 5 лет назад
Родитель
Сommit
371eed6b6e
1 измененных файлов с 8 добавлено и 5 удалено
  1. 8 5
      conanfile.py

+ 8 - 5
conanfile.py

@@ -13,21 +13,24 @@ class LibFlacConan(ConanFile):
     homepage = "https://xiph.org/flac/"
     topics = ("media", "audio", "lossless", "xiph.org")
     settings = "os", "compiler", "build_type", "arch"
-    options = {"shared": [True, False]}
-    default_options = {"shared": False}
-    generators = "cmake"
+    options = {"shared": [True, False], "fPIC": [True, False]}
+    default_options = {"shared": True, "fPIC": True}
 
     @property
     def subfolder(self):
         return os.path.join(self.source_folder, f"flac-{self.version}")
 
-    def source(self):
-        tools.get(**self.conan_data["sources"][self.version])
+    def config_options(self):
+        if self.settings.os == "Windows":
+            self.options.remove("fPIC")
 
     def configure(self):
         del self.settings.compiler.cppstd
         del self.settings.compiler.libcxx
 
+    def source(self):
+        tools.get(**self.conan_data["sources"][self.version])
+
     def build(self):
         cmake = CMake(self)
         cmake.configure(source_folder="hello")