diff --git a/meson.build b/meson.build index 1f5c13fdb4..d6a3b25c43 100644 --- a/meson.build +++ b/meson.build @@ -555,7 +555,11 @@ libarchive = dependency('libarchive') # Check for debug console (Win32) if platform_windows - conf.set('ENABLE_WIN32_DEBUG_CONSOLE', get_option('win32-debug-console')) + enable_win32_debug_console = get_option('win32-debug-console').enabled() or \ + (get_option('win32-debug-console').auto() and (not stable or not release)) + conf.set('ENABLE_WIN32_DEBUG_CONSOLE', enable_win32_debug_console) + # When we'll depend on meson >= 1.1.0, we can just use: + # conf.set('ENABLE_WIN32_DEBUG_CONSOLE', get_option('win32-debug-console').enable_auto_if(not stable or not release).enabled()) endif ################################################################################ diff --git a/meson_options.txt b/meson_options.txt index 93b54178b0..7db3ccb73a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ # Build properties option('ansi', type: 'boolean', value: false, description: 'Turn on strict ansi') option('enable-console-bin',type: 'boolean', value: true, description: 'Build a console-only binary which does not link GTK') -option('win32-debug-console',type:'boolean', value: true, description: 'Open a console when starting the program') +option('win32-debug-console',type:'feature', value: 'auto', description: 'Open a console when starting the program') option('enable-multiproc', type: 'boolean', value: true, description: 'Support for multiple processors') option('profiling', type: 'boolean', value: false, description: 'Enable profiling') option('windows-installer', type: 'boolean', value: false, description: 'Generate files needed for the Inno Windows installer')