meson: detect 'offscale' support in edje_cc. Closes T6770

This commit is contained in:
Boris Faure 2018-03-12 14:48:50 +01:00
parent 0a0f3605e4
commit bf110393b6
4 changed files with 27 additions and 0 deletions

11
data/test_offscale.edc Normal file
View File

@ -0,0 +1,11 @@
collections {
group { name: "offscale_test";
parts {
part { name: "offscale_part";
description { state: "default" 0.0;
offscale;
}
}
}
}
}

View File

@ -697,7 +697,9 @@ collections {
rel.to: "sendfile_request_bg"; rel.to: "sendfile_request_bg";
rel1.offset: 4 4; rel1.offset: 4 4;
rel2.offset: -5 -5; rel2.offset: -5 -5;
#if HAS_OFFSCALE
offscale; offscale;
#endif
} }
description { state: "on" 0.0; description { state: "on" 0.0;
inherit: "default" 0.0; inherit: "default" 0.0;
@ -767,7 +769,9 @@ collections {
rel.to: "terminology.sendfile.progress"; rel.to: "terminology.sendfile.progress";
rel1.offset: -4 -4; rel1.offset: -4 -4;
rel2.offset: 4 4; rel2.offset: 4 4;
#if HAS_OFFSCALE
offscale; offscale;
#endif
} }
} }
part { name: "terminology.sendfile.progress"; type: SWALLOW; part { name: "terminology.sendfile.progress"; type: SWALLOW;
@ -779,7 +783,9 @@ collections {
rel2.relative: 1.0 0.0; rel2.relative: 1.0 0.0;
rel2.offset: -5 -5; rel2.offset: -5 -5;
align: 0.5 1.0; align: 0.5 1.0;
#if HAS_OFFSCALE
offscale; offscale;
#endif
} }
description { state: "on" 0.0; description { state: "on" 0.0;
inherit: "default" 0.0; inherit: "default" 0.0;

View File

@ -1,4 +1,5 @@
command = [edje_cc, command = [edje_cc,
edje_offscale,
'-id', join_paths(meson.source_root(), 'data', 'themes', 'images'), '-id', join_paths(meson.source_root(), 'data', 'themes', 'images'),
'-fd', join_paths(meson.source_root(), 'data', 'fonts'), '-fd', join_paths(meson.source_root(), 'data', 'fonts'),
'-sd', join_paths(meson.source_root(), 'data', 'themes', 'sounds'), '-sd', join_paths(meson.source_root(), 'data', 'themes', 'sounds'),

View File

@ -97,6 +97,15 @@ if edje_cc == ''
edje_cc = edje_cc_path edje_cc = edje_cc_path
endif endif
res = run_command(edje_cc, meson.current_source_dir() + '/data/test_offscale.edc')
if res.returncode() == 0
message('edje_cc has support for offscale')
edje_offscale='-DHAS_OFFSCALE=1'
else
message('edje_cc does not have support for offscale')
edje_offscale='-DHAS_OFFSCALE=0'
endif
fuzzing = get_option('fuzzing') fuzzing = get_option('fuzzing')
if fuzzing if fuzzing