Skip to content

Commit

Permalink
freeglut: fix broken wayland build
Browse files Browse the repository at this point in the history
The most recent commit, 8472c96 ("freeglut: add missing dependencies")
broke when this was built for wayland, in two ways:

1. It dropped the xkbcommon dep, which is required on Wayland as well
2. It started passing x11_dep to the XParseGeometry-detection, but
   x11_dep isn't set in that code-path.

The former was fixed simply by adding it back. The latter was fixed by
dropping the x11_dep in the Windows code-path, and rather passing all of
freeglut_deps to the detection logic.
  • Loading branch information
kusma authored and neheb committed Feb 8, 2025
1 parent e36c643 commit a73fce3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@
"glut"
],
"versions": [
"3.4.0-3",
"3.4.0-2",
"3.4.0-1"
]
Expand Down
4 changes: 2 additions & 2 deletions subprojects/packagefiles/freeglut/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ if host_system == 'windows'

freeglut_deps += cc.find_library('winmm')
freeglut_deps += cc.find_library('gdi32')
x11_dep = dependency('', required: false)

else # not windows

Expand Down Expand Up @@ -143,6 +142,7 @@ else # not windows
add_project_arguments('-DFREEGLUT_WAYLAND', language: 'c')
freeglut_deps += dependency('wayland-client, wayland-cursor')
freeglut_deps += dependency('wayland-egl, egl')
freeglut_deps += dependency('xkbcommon')

else
freeglut_sources += files(
Expand Down Expand Up @@ -209,7 +209,7 @@ if cc.has_function('gettimeofday')
add_project_arguments('-DHAVE_GETTIMEOFDAY', language: 'c')
endif

if cc.has_function('XParseGeometry', dependencies: x11_dep,
if cc.has_function('XParseGeometry', dependencies: freeglut_deps,
prefix: '#include <X11/Xlib.h>')
add_project_arguments('-DHAVE_XPARSEGEOMETRY', language: 'c')
else
Expand Down

0 comments on commit a73fce3

Please sign in to comment.