Skip to content

Commit

Permalink
Revert "(#21238) brunsli: allow shared brotli dependency"
Browse files Browse the repository at this point in the history
This reverts commit 2584ccd.
  • Loading branch information
AbrilRBS authored Sep 26, 2024
1 parent 2584ccd commit bd8f153
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions recipes/brunsli/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file, save
Expand Down Expand Up @@ -36,6 +37,7 @@ def config_options(self):
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
self.options["brotli"].shared = False

def layout(self):
cmake_layout(self, src_folder="src")
Expand All @@ -46,6 +48,8 @@ def requirements(self):
def validate(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, 11)
if self.dependencies["brotli"].options.shared:
raise ConanInvalidConfiguration("brotli must be built as a static library")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down Expand Up @@ -90,9 +94,7 @@ def package(self):

def package_info(self):
self.cpp_info.components["brunslidec-c"].libs = ["brunslidec-c"]
self.cpp_info.components["brunslidec-c"].requires = ["brotli::brotlidec"]
self.cpp_info.components["brunslienc-c"].libs = ["brunslienc-c"]
self.cpp_info.components["brunslienc-c"].requires = ["brotli::brotlienc"]
if not self.options.shared:
self.cpp_info.components["brunslidec-c"].libs += ["brunslicommon-static", "brunslidec-static"]
self.cpp_info.components["brunslienc-c"].libs += ["brunslicommon-static", "brunslienc-static"]

0 comments on commit bd8f153

Please sign in to comment.