Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glibmm v2 toolchain #14930

Merged
merged 15 commits into from
Feb 3, 2023
Merged
Prev Previous commit
[glibmm] review suggestions
  • Loading branch information
planetmarshall committed Feb 3, 2023
commit 24ce0b6763f0cbac54981578df31bff6edfe6245
16 changes: 5 additions & 11 deletions recipes/glibmm/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def requirements(self):
self.requires("libsigcpp/2.10.8")

def package_id(self):
if not self.options["glib"].shared:
if not self.dependencies["glib"].options.shared:
self.info.requires["glib"].full_package_mode()

def validate(self):
Expand All @@ -84,7 +84,7 @@ def validate(self):
else:
check_min_cppstd(self, 11)

if self.options.shared and not self.dependencies["glib"].shared:
if self.options.shared and not self.dependencies["glib"].options.shared:
raise ConanInvalidConfiguration(
"Linking a shared library against static glib can cause unexpected behaviour."
)
Expand All @@ -111,8 +111,7 @@ def generate(self):
tc.project_options.update({
"build-examples": "false",
"build-documentation": "false",
"msvc14x-parallel-installable": "false",
"default_library": "shared" if self.options.shared else "static"
"msvc14x-parallel-installable": "false"
})
tc.generate()

Expand Down Expand Up @@ -180,17 +179,12 @@ def rename_msvc_static_libs():

def package_info(self):
glibmm_component = f"glibmm-{self._abi_version}"
giomm_component = f"giomm-{self._abi_version}"

self.cpp_info.components[glibmm_component].set_property("pkg_config_name", glibmm_component)
self.cpp_info.components[glibmm_component].libs = [glibmm_component]
self.cpp_info.components[glibmm_component].includedirs = [os.path.join("include", glibmm_component)]
self.cpp_info.components[glibmm_component].requires = ["glib::gobject-2.0", "libsigcpp::libsigcpp"]

if self._abi_version == "2.68":
self.cpp_info.components[glibmm_component].requires = ["glib::gobject-2.0", "libsigcpp::sigc++"]
else:
self.cpp_info.components[glibmm_component].requires = ["glib::gobject-2.0", "libsigcpp::libsigcpp"]

giomm_component = f"giomm-{self._abi_version}"
self.cpp_info.components[giomm_component].set_property("pkg_config_name", giomm_component)
self.cpp_info.components[giomm_component].libs = [giomm_component]
self.cpp_info.components[giomm_component].includedirs = [os.path.join("include", giomm_component)]
Expand Down