Skip to contentSkip to conversation

meson.build: Print gtk version in the summary info

PATCH In review Thomas Huth 3 participants 4 messages Jan 5, 2022 – Jan 7, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson.build: Print gtk version in the summary info

The "gtk" variable is re-declared as "dependencies: [gtk, gtkx11]", so there is just a "YES" in the summary info if gtk has been found. Let's use the info from the library detection instead so that the library version is printed in the summary instead.

---
 meson.build | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meson.build +6 -6
index 82769749db..798811dfbb 100644
@@ -1058,11 +1058,11 @@ gtk = not_found
 gtkx11 = not_found
 vte = not_found
 if not get_option('gtk').auto() or (have_system and not cocoa.found())
-  gtk = dependency('gtk+-3.0', version: '>=3.22.0',
-                   method: 'pkg-config',
-                   required: get_option('gtk'),
-                   kwargs: static_kwargs)
-  if gtk.found()
+  libgtk = dependency('gtk+-3.0', version: '>=3.22.0',
+                      method: 'pkg-config',
+                      required: get_option('gtk'),
+                      kwargs: static_kwargs)
+  if libgtk.found()
     gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
                         method: 'pkg-config',
                         required: false,
@@ -3410,7 +3410,7 @@ if targetos == 'darwin'
 endif
 summary_info += {'SDL support':       sdl}
 summary_info += {'SDL image support': sdl_image}
-summary_info += {'GTK support':       gtk}
+summary_info += {'GTK support':       libgtk}
 summary_info += {'pixman':            pixman}
 summary_info += {'VTE support':       vte}
 summary_info += {'slirp support':     slirp_opt == 'internal' ? slirp_opt : slirp}
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thomas Huth

The "gtk" variable is re-declared as "dependencies: [gtk, gtkx11]", so there is just a "YES" in the summary info if gtk has been found. Let's use the info from the library detection instead so that the library version is printed in the summary instead.

---
  meson.build | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 9 lines · Thomas Huth

The "gtk" variable is re-declared as "dependencies: [gtk, gtkx11]", so there is just a "YES" in the summary info if gtk has been found. Let's use the info from the library detection instead so that the library version is printed in the summary instead.

---
  meson.build | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

r~

#3 lore raw
In reply to Thomas Huth
Quoted 15 lines · Thomas Huth

The "gtk" variable is re-declared as "dependencies: [gtk, gtkx11]", so there is just a "YES" in the summary info if gtk has been found. Let's use the info from the library detection instead so that the library version is printed in the summary instead.

---
  meson.build | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
meson.build +0 -0
index 82769749db..798811dfbb 100644

meson.build gtk = not_found · line 1059

Quoted 2 lines
meson.build +0 -0
@@ -1058,11 +1058,11 @@ gtk = not_found
  gtkx11 = not_found
  vte = not_found

Drat, I'm missing a "libgtk = not_found" here ... I'll send a v2.

Thomas

Quoted 23 lines
meson.build +6 -6
  if not get_option('gtk').auto() or (have_system and not cocoa.found())
-  gtk = dependency('gtk+-3.0', version: '>=3.22.0',
-                   method: 'pkg-config',
-                   required: get_option('gtk'),
-                   kwargs: static_kwargs)
-  if gtk.found()
+  libgtk = dependency('gtk+-3.0', version: '>=3.22.0',
+                      method: 'pkg-config',
+                      required: get_option('gtk'),
+                      kwargs: static_kwargs)
+  if libgtk.found()
      gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
                          method: 'pkg-config',
                          required: false,
@@ -3410,7 +3410,7 @@ if targetos == 'darwin'
  endif
  summary_info += {'SDL support':       sdl}
  summary_info += {'SDL image support': sdl_image}
-summary_info += {'GTK support':       gtk}
+summary_info += {'GTK support':       libgtk}
  summary_info += {'pixman':            pixman}
  summary_info += {'VTE support':       vte}
  summary_info += {'slirp support':     slirp_opt == 'internal' ? slirp_opt : slirp}