mirror of https://github.com/kivy/pyjnius.git
Merge pull request #441 from ctrueden/macos-library-linkage
Link to libjli, not libjvm, on macOS
This commit is contained in:
commit
bdeca78ad5
10
setup.py
10
setup.py
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue