Skip to contentSkip to conversation

meson: fix Cocoa option in summary

PATCH Applied Chris Hofstaedtler 3 participants 4 messages Dec 30, 2020 – Jan 7, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 meson: fix Cocoa option in summary

Cocoa support was always shown as "no", even it if was enabled.

Fixes b4e312e953b ("configure: move cocoa option to Meson")
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Philippe Mathieu-Daudé <[email protected]>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index 372576f82c..1112ca8fc2 100644
@@ -2082,7 +2082,7 @@ summary_info += {'strip binaries':    get_option('strip')}
 summary_info += {'profiler':          config_host.has_key('CONFIG_PROFILER')}
 summary_info += {'static build':      config_host.has_key('CONFIG_STATIC')}
 if targetos == 'darwin'
-  summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
+  summary_info += {'Cocoa support': config_host_data.get('CONFIG_COCOA', false)}
 endif
 # TODO: add back version
 summary_info += {'SDL support':       sdl.found()}
Signature · 1 line
2.29.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 17 lines · Chris Hofstaedtler

Cocoa support was always shown as "no", even it if was enabled.

Fixes b4e312e953b ("configure: move cocoa option to Meson")
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Philippe Mathieu-Daudé <[email protected]>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +0 -0
index 372576f82c..1112ca8fc2 100644

meson.build summary_info += {'strip binaries': get_option('strip')} · line 2088

Quoted 8 lines
meson.build +1 -1
@@ -2082,7 +2082,7 @@ summary_info += {'strip binaries':    get_option('strip')}
 summary_info += {'profiler':          config_host.has_key('CONFIG_PROFILER')}
 summary_info += {'static build':      config_host.has_key('CONFIG_STATIC')}
 if targetos == 'darwin'
-  summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
+  summary_info += {'Cocoa support': config_host_data.get('CONFIG_COCOA', false)}
 endif
 # TODO: add back version
 summary_info += {'SDL support':       sdl.found()}
#2 lore raw
In reply to Chris Hofstaedtler
Quoted 17 lines · Chris Hofstaedtler

Cocoa support was always shown as "no", even it if was enabled.

Fixes b4e312e953b ("configure: move cocoa option to Meson")
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Philippe Mathieu-Daudé <[email protected]>
---
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +0 -0
index 372576f82c..1112ca8fc2 100644

meson.build summary_info += {'strip binaries': get_option('strip')} · line 2088

Quoted 8 lines
meson.build +1 -1
@@ -2082,7 +2082,7 @@ summary_info += {'strip binaries':    get_option('strip')}
  summary_info += {'profiler':          config_host.has_key('CONFIG_PROFILER')}
  summary_info += {'static build':      config_host.has_key('CONFIG_STATIC')}
  if targetos == 'darwin'
-  summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
+  summary_info += {'Cocoa support': config_host_data.get('CONFIG_COCOA', false)}
  endif
  # TODO: add back version
  summary_info += {'SDL support':       sdl.found()}

Using config_host_data makes sense, however "cocoa.found()" is more consistent with the surrounding code.

Paolo

#3 lore raw
In reply to Chris Hofstaedtler
Quoted 17 lines · Chris Hofstaedtler

Cocoa support was always shown as "no", even it if was enabled.

Fixes b4e312e953b ("configure: move cocoa option to Meson")
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Philippe Mathieu-Daudé <[email protected]>
---
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +0 -0
index 372576f82c..1112ca8fc2 100644

meson.build summary_info += {'strip binaries': get_option('strip')} · line 2088

Quoted 8 lines
meson.build +1 -1
@@ -2082,7 +2082,7 @@ summary_info += {'strip binaries':    get_option('strip')}
  summary_info += {'profiler':          config_host.has_key('CONFIG_PROFILER')}
  summary_info += {'static build':      config_host.has_key('CONFIG_STATIC')}
  if targetos == 'darwin'
-  summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
+  summary_info += {'Cocoa support': config_host_data.get('CONFIG_COCOA', false)}
  endif
  # TODO: add back version
  summary_info += {'SDL support':       sdl.found()}

Queued, thanks.

Paolo