Fix some issues with Meson build scripts. (Regression from commit ca566eb.)
This commit is contained in:
parent
ca566eb11b
commit
46990f2d85
|
@ -15,11 +15,18 @@ dep_sdl = dependency('sdl2')
|
||||||
dep_pcap = dependency('pcap')
|
dep_pcap = dependency('pcap')
|
||||||
dep_zlib = dependency('zlib')
|
dep_zlib = dependency('zlib')
|
||||||
dep_threads = dependency('threads')
|
dep_threads = dependency('threads')
|
||||||
dep_gl = dependency('gl', required: false)
|
|
||||||
dep_openal = dependency('openal', required: get_option('openal'))
|
dep_openal = dependency('openal', required: get_option('openal'))
|
||||||
dep_alsa = dependency('alsa', required: false)
|
dep_alsa = dependency('alsa', required: false)
|
||||||
dep_soundtouch = dependency('soundtouch', required: false)
|
dep_soundtouch = dependency('soundtouch', required: false)
|
||||||
|
|
||||||
|
if host_machine.system() == 'darwin'
|
||||||
|
dep_gl = dependency('appleframeworks', modules: 'OpenGL')
|
||||||
|
dep_gles = dependency('appleframeworks', modules: 'OpenGLES')
|
||||||
|
else
|
||||||
|
dep_gl = dependency('gl', required: false)
|
||||||
|
dep_gles = dependency('glesv2', required: false)
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('wifi')
|
if get_option('wifi')
|
||||||
add_global_arguments('-DEXPERIMENTAL_WIFI_COMM', language: ['c', 'cpp'])
|
add_global_arguments('-DEXPERIMENTAL_WIFI_COMM', language: ['c', 'cpp'])
|
||||||
endif
|
endif
|
||||||
|
@ -173,14 +180,29 @@ if have_jit
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'darwin'
|
if get_option('opengles')
|
||||||
dependencies += dependency('appleframeworks', modules: 'OpenGL')
|
if dep_gles.found()
|
||||||
elif dep_gl.found()
|
add_global_arguments('-DENABLE_OPENGL_ES', language: ['c', 'cpp'])
|
||||||
dependencies += dep_gl
|
dependencies += dep_gles
|
||||||
libdesmume_src += [
|
libdesmume_src += [
|
||||||
'../../OGLRender.cpp',
|
'../../OGLRender.cpp',
|
||||||
'../../OGLRender_3_2.cpp',
|
'../../OGLRender_3_2.cpp',
|
||||||
]
|
'../../OGLRender_ES3.cpp',
|
||||||
|
]
|
||||||
|
else
|
||||||
|
message('Cannot build with OpenGL ES -- library not found.')
|
||||||
|
endif
|
||||||
|
elif get_option('opengl')
|
||||||
|
if dep_gl.found()
|
||||||
|
add_global_arguments('-DENABLE_OPENGL_STANDARD', language: ['c', 'cpp'])
|
||||||
|
dependencies += dep_gl
|
||||||
|
libdesmume_src += [
|
||||||
|
'../../OGLRender.cpp',
|
||||||
|
'../../OGLRender_3_2.cpp',
|
||||||
|
]
|
||||||
|
else
|
||||||
|
message('Cannot build with OpenGL -- library not found.')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if dep_openal.found()
|
if dep_openal.found()
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
option('opengl',
|
||||||
|
type: 'boolean',
|
||||||
|
value: false,
|
||||||
|
description: 'Build for OpenGL',
|
||||||
|
)
|
||||||
|
option('opengles',
|
||||||
|
type: 'boolean',
|
||||||
|
value: false,
|
||||||
|
description: 'Build for OpenGL ES',
|
||||||
|
)
|
||||||
option('openal',
|
option('openal',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: false,
|
value: false,
|
||||||
|
|
|
@ -25,20 +25,14 @@ desmume_src = [
|
||||||
]
|
]
|
||||||
|
|
||||||
if get_option('glx') and dep_glx.found()
|
if get_option('glx') and dep_glx.found()
|
||||||
add_global_arguments('-DENABLE_GLX', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_glx
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/glx_3Demu.cpp',
|
'../shared/glx_3Demu.cpp',
|
||||||
]
|
]
|
||||||
elif get_option('osmesa') and dep_osmesa.found()
|
elif get_option('osmesa') and dep_osmesa.found()
|
||||||
add_global_arguments('-DENABLE_OSMESA', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_osmesa
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/osmesa_3Demu.cpp',
|
'../shared/osmesa_3Demu.cpp',
|
||||||
]
|
]
|
||||||
elif get_option('egl') and dep_egl.found()
|
elif get_option('egl') and dep_egl.found()
|
||||||
add_global_arguments('-DENABLE_EGL', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_egl
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/egl_3Demu.cpp',
|
'../shared/egl_3Demu.cpp',
|
||||||
]
|
]
|
||||||
|
|
|
@ -18,20 +18,14 @@ desmume_src = [
|
||||||
]
|
]
|
||||||
|
|
||||||
if get_option('glx') and dep_glx.found()
|
if get_option('glx') and dep_glx.found()
|
||||||
add_global_arguments('-DENABLE_GLX', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_glx
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/glx_3Demu.cpp',
|
'../shared/glx_3Demu.cpp',
|
||||||
]
|
]
|
||||||
elif get_option('osmesa') and dep_osmesa.found()
|
elif get_option('osmesa') and dep_osmesa.found()
|
||||||
add_global_arguments('-DENABLE_OSMESA', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_osmesa
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/osmesa_3Demu.cpp',
|
'../shared/osmesa_3Demu.cpp',
|
||||||
]
|
]
|
||||||
elif get_option('egl') and dep_egl.found()
|
elif get_option('egl') and dep_egl.found()
|
||||||
add_global_arguments('-DENABLE_EGL', language: ['c', 'cpp'])
|
|
||||||
dependencies += dep_egl
|
|
||||||
desmume_src += [
|
desmume_src += [
|
||||||
'../shared/egl_3Demu.cpp',
|
'../shared/egl_3Demu.cpp',
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue