|
@@ -15,27 +15,32 @@ class LibOggConan(ConanFile):
|
|
topics = ("xiph.org", "media", "container")
|
|
topics = ("xiph.org", "media", "container")
|
|
exports_sources = ["CMakeLists.txt", "patches/*"]
|
|
exports_sources = ["CMakeLists.txt", "patches/*"]
|
|
settings = "os", "compiler", "build_type", "arch"
|
|
settings = "os", "compiler", "build_type", "arch"
|
|
- options = {"shared": [True, False]}
|
|
|
|
- default_options = {"shared": False}
|
|
|
|
|
|
+ options = {"shared": [True, False], "fPIC": [True, False]}
|
|
|
|
+ default_options = {"shared": False, "fPIC": True}
|
|
generators = "cmake"
|
|
generators = "cmake"
|
|
|
|
|
|
@property
|
|
@property
|
|
def subfolder(self):
|
|
def subfolder(self):
|
|
return os.path.join(self.source_folder, f"libogg-{self.version}")
|
|
return os.path.join(self.source_folder, f"libogg-{self.version}")
|
|
|
|
|
|
- def source(self):
|
|
|
|
- tools.get(**self.conan_data["sources"][self.version])
|
|
|
|
- for patch in self.conan_data["patches"][self.version]:
|
|
|
|
- tools.patch(base_path=self.subfolder, **patch)
|
|
|
|
|
|
+ def config_options(self):
|
|
|
|
+ if self.settings.os == "Windows":
|
|
|
|
+ self.options.remove("fPIC")
|
|
|
|
|
|
def configure(self):
|
|
def configure(self):
|
|
del self.settings.compiler.cppstd
|
|
del self.settings.compiler.cppstd
|
|
del self.settings.compiler.libcxx
|
|
del self.settings.compiler.libcxx
|
|
|
|
|
|
|
|
+ def source(self):
|
|
|
|
+ tools.get(**self.conan_data["sources"][self.version])
|
|
|
|
+ for patch in self.conan_data["patches"][self.version]:
|
|
|
|
+ tools.patch(base_path=self.subfolder, **patch)
|
|
|
|
+
|
|
def _configure_cmake(self):
|
|
def _configure_cmake(self):
|
|
cmake = CMake(self)
|
|
cmake = CMake(self)
|
|
- cmake.definitions["BUILD_TESTING"] = False
|
|
|
|
cmake.definitions["CONAN_SOURCE_LOCATION"] = self.subfolder
|
|
cmake.definitions["CONAN_SOURCE_LOCATION"] = self.subfolder
|
|
|
|
+
|
|
|
|
+ cmake.definitions["BUILD_TESTING"] = False
|
|
cmake.definitions["INSTALL_CMAKE_PACKAGE_MODULE"] = False
|
|
cmake.definitions["INSTALL_CMAKE_PACKAGE_MODULE"] = False
|
|
cmake.definitions["INSTALL_DOCS"] = False
|
|
cmake.definitions["INSTALL_DOCS"] = False
|
|
cmake.definitions["INSTALL_PKG_CONFIG_MODULE"] = False
|
|
cmake.definitions["INSTALL_PKG_CONFIG_MODULE"] = False
|
|
@@ -47,9 +52,9 @@ class LibOggConan(ConanFile):
|
|
cmake.build()
|
|
cmake.build()
|
|
|
|
|
|
def package(self):
|
|
def package(self):
|
|
- self.copy("COPYING", src=self.subfolder, dst="licenses", ignore_case=True, keep_path=False)
|
|
|
|
cmake = self._configure_cmake()
|
|
cmake = self._configure_cmake()
|
|
cmake.install()
|
|
cmake.install()
|
|
|
|
+ self.copy("COPYING", src=self.subfolder, dst="licenses", keep_path=False)
|
|
|
|
|
|
def package_info(self):
|
|
def package_info(self):
|
|
self.cpp_info.libs = ["ogg"]
|
|
self.cpp_info.libs = ["ogg"]
|