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

glfw: limit xorg library dependencies #23272

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

johningve
Copy link
Contributor

Previously the glfw package would implicitly require linking with xorg::xorg, which includes all the libraries exposed by the xorg package.

This change explicitly declares the requirements of glfw, limiting the xorg libraries to only those needed.

From version 3.4 these dependencies are no longer necessary since glew implemented runtime platform detection.

Also removes vulkan_static option in version 3.4, since it is no longer supported by glfw.

Specify library name and version: glfw/all


Previously the glfw package would implicitly require linking with
xorg::xorg, which includes all the libraries exposed by the xorg
package.

This commit explicitly declares the requirements of glfw, limiting the
xorg libraries to only those needed.
The ability to link to a static Vulkan loader was removed in glfw
version 3.4.
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/glfw//'.

👋 @Hopobcn you might be interested. 😉

Comment on lines 224 to 233
if Version(self.version) < "3.4":
if self.options.get_safe("vulkan_static"):
self.cpp_info.requires.extend(["vulkan-loader::vulkan-loader"])
if self.settings.os in ["Linux", "FreeBSD"]:
if self.options.get_safe("with_x11", True):
self.cpp_info.requires.extend(["xorg::x11"])
if self.options.get_safe("with_wayland"):
self.cpp_info.requires.extend(["wayland::wayland", "xkbcommon::xkbcommon"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if Version(self.version) < "3.4":
if self.options.get_safe("vulkan_static"):
self.cpp_info.requires.extend(["vulkan-loader::vulkan-loader"])
if self.settings.os in ["Linux", "FreeBSD"]:
if self.options.get_safe("with_x11", True):
self.cpp_info.requires.extend(["xorg::x11"])
if self.options.get_safe("with_wayland"):
self.cpp_info.requires.extend(["wayland::wayland", "xkbcommon::xkbcommon"])
if self.options.get_safe("vulkan_static"):
self.cpp_info.requires.extend(["vulkan-loader::vulkan-loader"])
if self.settings.os in ["Linux", "FreeBSD"]:
if self.options.get_safe("with_x11", True):
self.cpp_info.requires.extend(["xorg::x11"])
if self.options.get_safe("with_wayland"):
self.cpp_info.requires.extend(["wayland::wayland", "xkbcommon::xkbcommon"])

I don't think the version check is necessary as it's already handled by the deleted options in configure(), no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the version check is needed because even when you specify with_x11=True or with_wayland=True, the glfw library does not require linking with these after version 3.4, which implemented the runtime platform detection.

@conan-center-bot

This comment has been minimized.

From version 3.4, glfw loads platform libraries at runtime, and so it is
not necessary to link with these.
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 2 (c05ac9dbdb4ad9a5508a7f6c8575e8098ac60fbd):

  • glfw/3.3.8:
    All packages built successfully! (All logs)

  • glfw/3.4:
    All packages built successfully! (All logs)

  • glfw/3.3.7:
    All packages built successfully! (All logs)

  • glfw/3.3.6:
    All packages built successfully! (All logs)

  • glfw/3.3.5:
    All packages built successfully! (All logs)

  • glfw/3.3.4:
    All packages built successfully! (All logs)

  • glfw/3.3.3:
    All packages built successfully! (All logs)

  • glfw/3.3.2:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 2 (c05ac9dbdb4ad9a5508a7f6c8575e8098ac60fbd):

  • glfw/3.3.6:
    All packages built successfully! (All logs)

  • glfw/3.4:
    All packages built successfully! (All logs)

  • glfw/3.3.5:
    All packages built successfully! (All logs)

  • glfw/3.3.8:
    All packages built successfully! (All logs)

  • glfw/3.3.4:
    All packages built successfully! (All logs)

  • glfw/3.3.7:
    All packages built successfully! (All logs)

  • glfw/3.3.2:
    All packages built successfully! (All logs)

  • glfw/3.3.3:
    All packages built successfully! (All logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants