mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
Automate profile setting
We can derive whether we are build a developement snapshot or a stable version from the minor version number. So do that. This way, we'll get the devel profile selected in the nightly SDK, which will make the commit sha appear in the inspector, which is useful to determine what nightly users are testing.
This commit is contained in:
parent
f9c6bd125b
commit
cebc95f253
11
meson.build
11
meson.build
@ -787,9 +787,18 @@ gen_visibility_macros = find_program('build-aux/meson/gen-visibility-macros.py')
|
||||
|
||||
gen_profile_conf = find_program('build-aux/meson/gen-profile-conf.py')
|
||||
|
||||
profile = get_option('profile')
|
||||
if profile == 'auto'
|
||||
if gtk_minor_version.is_even()
|
||||
profile = 'default'
|
||||
else
|
||||
profile = 'devel'
|
||||
endif
|
||||
endif
|
||||
|
||||
profile_conf_h = declare_dependency(
|
||||
sources: custom_target('profile-conf',
|
||||
command: [gen_profile_conf, meson.project_source_root(), get_option('profile')],
|
||||
command: [gen_profile_conf, meson.project_source_root(), profile],
|
||||
capture: true,
|
||||
output: 'profile_conf.h',
|
||||
build_by_default: true,
|
||||
|
@ -124,14 +124,14 @@ option('man-pages',
|
||||
|
||||
option('demo-profile',
|
||||
type: 'combo',
|
||||
choices: [ 'default', 'devel' ],
|
||||
value: 'default',
|
||||
choices: [ 'auto', 'default', 'devel' ],
|
||||
value: 'auto',
|
||||
deprecated: 'profile')
|
||||
|
||||
option('profile',
|
||||
type: 'combo',
|
||||
choices: [ 'default', 'devel' ],
|
||||
value: 'default',
|
||||
choices: [ 'auto', 'default', 'devel' ],
|
||||
value: 'auto',
|
||||
description : 'Profile to use for demos')
|
||||
|
||||
option('build-demos',
|
||||
|
Loading…
Reference in New Issue
Block a user