Skip to content

Commit

Permalink
[cairomm]: use shared glib for shared cairomm
Browse files Browse the repository at this point in the history
  • Loading branch information
theartful committed Jul 1, 2022
1 parent e4f5f04 commit e1b5bc4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions recipes/cairomm/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def validate(self):
tools.check_min_cppstd(self, 17)
else:
tools.check_min_cppstd(self, 11)
if self.options.shared and not self.options["cairo"].shared:
raise ConanInvalidConfiguration(
"Linking against static cairo would cause shared cairomm to link "
"against static glib which can cause problems."
)

@property
def _source_subfolder(self):
Expand Down Expand Up @@ -69,6 +74,8 @@ def config_options(self):
def configure(self):
if self.options.shared:
del self.options.fPIC
if self.options.shared:
self.options["cairo"].shared = True

def build_requirements(self):
self.build_requires("meson/0.59.1")
Expand Down Expand Up @@ -182,3 +189,6 @@ def package_info(self):
self.cpp_info.components["cairomm-1.0"].frameworks = [
"CoreFoundation"
]

def package_id(self):
self.info.requires["cairo"].full_package_mode()

0 comments on commit e1b5bc4

Please sign in to comment.