Merge pull request #441 from ctrueden/macos-library-linkage

Link to libjli, not libjvm, on macOS
This commit is contained in:
Gabriel Pettier 2019-09-17 12:10:55 +02:00 committed by GitHub
commit bdeca78ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -125,7 +125,7 @@ elif PLATFORM == 'darwin':
)
)]
else:
LIB_LOCATION = 'jre/lib/server/libjvm.dylib'
LIB_LOCATION = 'jre/lib/jli/libjli.dylib'
# We want to favor Java installation declaring JAVA_HOME
if getenv('JAVA_HOME'):
@ -136,7 +136,13 @@ elif PLATFORM == 'darwin':
if not exists(FULL_LIB_LOCATION):
# In that case, the Java version is very likely >=9.
# So we need to modify the `libjvm.so` path.
LIB_LOCATION = 'lib/server/libjvm.dylib'
LIB_LOCATION = 'lib/jli/libjli.dylib'
FULL_LIB_LOCATION = join(FRAMEWORK, LIB_LOCATION)
if not exists(FULL_LIB_LOCATION):
# adoptopenjdk12 doesn't have the jli subfolder either
LIB_LOCATION = 'lib/libjli.dylib'
FULL_LIB_LOCATION = join(FRAMEWORK, LIB_LOCATION)
INCLUDE_DIRS = [
'{0}/include'.format(FRAMEWORK),