summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-04-01 19:22:18 -0400
committerWilliam Deegan <bill@baddogconsulting.com>2017-04-01 19:22:18 -0400
commitb2221b1bfe979446bdc6c4f20c014e67d2556f8a (patch)
tree868f789163b86e577b999b1234a154d6916bc5f5 /QMTest
parentcca81b0f0dd2138ed9fce5fbcb3d7942f7cf49f6 (diff)
downloadscons-b2221b1bfe979446bdc6c4f20c014e67d2556f8a.tar.gz
macosx improve logic to find jni.h
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestSCons.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index ee10508a..467d5a8c 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -707,8 +707,15 @@ class TestSCons(TestCommon):
"""
Return java include paths compiling java jni code
"""
- import glob
import sys
+
+ result = []
+ if sys.platform[:6] == 'darwin':
+ java_home = self.java_where_java_home(version)
+ jni_path = os.path.join(java_home,'include','jni.h')
+ if os.path.exists(jni_path):
+ result.append(os.path.dirname(jni_path))
+
if not version:
version=''
jni_dirs = ['/System/Library/Frameworks/JavaVM.framework/Headers/jni.h',
@@ -723,7 +730,7 @@ class TestSCons(TestCommon):
if not dirs:
return None
d=os.path.dirname(self.paths(jni_dirs)[0])
- result=[d]
+ result.append(d)
if sys.platform == 'win32':
result.append(os.path.join(d,'win32'))