dependency's wanted version might be a list
A dependency declared in a subproject should be able to behave as a pkgconfig dependency, thus it should process the wanted version as a list.
This commit is contained in:
parent
e9a7b0d2a9
commit
6f7f7c69a2
|
@ -2349,7 +2349,7 @@ to directly access options of other subprojects.''')
|
||||||
def check_subproject_version(wanted, found):
|
def check_subproject_version(wanted, found):
|
||||||
if wanted == 'undefined':
|
if wanted == 'undefined':
|
||||||
return True
|
return True
|
||||||
if found == 'undefined' or not mesonlib.version_compare(found, wanted):
|
if found == 'undefined' or not mesonlib.version_compare_many(found, wanted)[0]:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
project('subproject version', 'c',
|
||||||
|
version : '2.3.4',
|
||||||
|
license: 'mylicense')
|
||||||
|
|
||||||
|
subproject('a')
|
||||||
|
|
||||||
|
liba_dep = dependency('a',
|
||||||
|
fallback: ['a', 'liba_dep'],
|
||||||
|
version: ['>= 0.30.0', '!= 0.99.0'])
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
project('mysubproject', 'c',
|
||||||
|
version : '1.0.0',
|
||||||
|
license : 'sublicense')
|
||||||
|
|
||||||
|
liba_dep = declare_dependency (version : '1.0.0')
|
Loading…
Reference in New Issue