dependencies/jni: Properly resolve jni dep on android

The NDK has a jni.h in sysroot/usr/include/, there are no extra native
modules that provide any callable symbols.
pull/14225/head
Florian "sp1rit"​ 4 weeks ago
parent 0e6e68786c
commit 3270185ae3
No known key found for this signature in database
GPG Key ID: B1F4055D8460CE34
  1. 13
      mesonbuild/dependencies/dev.py

@ -568,6 +568,19 @@ class JNISystemDependency(SystemDependency):
m = self.env.machines[self.for_machine]
if m.is_android():
if kwargs.get('version'):
mlog.warning('Ignoring JNI version requirements because there is no mechanism to',
'determine the version on Android',
fatal=False)
self.is_found, _ = self.clib_compiler.has_header('jni.h', '', environment, dependencies=[self])
if kwargs.get('modules'):
mlog.warning('Android does not provide JNI modules', fatal=False)
self.is_found = False
return
if 'java' not in environment.coredata.compilers[self.for_machine]:
detect_compiler(self.name, environment, self.for_machine, 'java')
self.javac = environment.coredata.compilers[self.for_machine]['java']

Loading…
Cancel
Save