mirror of https://github.com/kivy/kivy.git
Merge branch 'android-support' of ssh://github.com/kivy/kivy into android-support
This commit is contained in:
commit
8aa08b7efe
18
setup.py
18
setup.py
|
@ -38,6 +38,13 @@ except ImportError:
|
||||||
from kivy.tools.packaging.factory import FactoryBuild
|
from kivy.tools.packaging.factory import FactoryBuild
|
||||||
cmdclass['build_factory'] = FactoryBuild
|
cmdclass['build_factory'] = FactoryBuild
|
||||||
|
|
||||||
|
#
|
||||||
|
# Detect Python for android project
|
||||||
|
#
|
||||||
|
ndkplatform = environ.get('NDKPLATFORM', None)
|
||||||
|
if ndkplatform is not None:
|
||||||
|
platform = 'android'
|
||||||
|
|
||||||
#
|
#
|
||||||
# Detect options
|
# Detect options
|
||||||
#
|
#
|
||||||
|
@ -48,12 +55,11 @@ c_options = {
|
||||||
'use_mesagl': 'USE_MESAGL' in environ}
|
'use_mesagl': 'USE_MESAGL' in environ}
|
||||||
|
|
||||||
# Detect which opengl version headers to use
|
# Detect which opengl version headers to use
|
||||||
if platform == 'win32':
|
if platform in ('android', 'darwin'):
|
||||||
|
pass
|
||||||
|
elif platform == 'win32':
|
||||||
print 'Windows platform detected, force GLEW usage.'
|
print 'Windows platform detected, force GLEW usage.'
|
||||||
c_options['use_glew'] = True
|
c_options['use_glew'] = True
|
||||||
elif platform == 'darwin':
|
|
||||||
# macosx is using their own gl.h
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
# searching GLES headers
|
# searching GLES headers
|
||||||
default_header_dirs = ['/usr/include', '/usr/local/include']
|
default_header_dirs = ['/usr/include', '/usr/local/include']
|
||||||
|
@ -128,6 +134,10 @@ if True:
|
||||||
elif platform.startswith('freebsd'):
|
elif platform.startswith('freebsd'):
|
||||||
include_dirs += ['/usr/local/include']
|
include_dirs += ['/usr/local/include']
|
||||||
extra_link_args += ['-L', '/usr/local/lib']
|
extra_link_args += ['-L', '/usr/local/lib']
|
||||||
|
elif platform == 'android':
|
||||||
|
include_dirs += [join(ndkplatform, 'usr', 'include')]
|
||||||
|
extra_link_args += ['-L', join(ndkplatform, 'usr', 'lib')]
|
||||||
|
libraries.append('GLESv2')
|
||||||
else:
|
else:
|
||||||
libraries.append('GLESv2')
|
libraries.append('GLESv2')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue