Feature #1881 » 0009-Meson-Use-host_machine.system-to-detect-emscripten-b.patch
| meson.build | ||
|---|---|---|
|
cross_inc_path = [cross_inc_str]
|
||
|
cross_lib_path = [meson.get_external_property('cross_lib_path', '')]
|
||
|
crosser = meson.get_external_property('crosser', false)
|
||
|
# emscripten build is always cross-build, so check it only here
|
||
|
if c_compiler.compiles(
|
||
|
'''#ifndef __EMSCRIPTEN__
|
||
|
error fail
|
||
|
#endif''',
|
||
|
name: 'emscripten')
|
||
|
emscripten = true
|
||
|
else
|
||
|
emscripten = false
|
||
|
endif
|
||
|
else
|
||
|
cross_inc_str = ''
|
||
|
cross_inc_path = []
|
||
|
cross_lib_path = []
|
||
|
crosser = false
|
||
|
emscripten = false
|
||
|
endif
|
||
|
if get_option('appimage')
|
||
| ... | ... | |
|
pub_conf_data.set('FREECIV_HAVE_CXX_NULLPTR', 1)
|
||
|
endif
|
||
|
if emscripten
|
||
|
if host_system == 'emscripten'
|
||
|
icu_dep = []
|
||
|
zlib_dep = []
|
||
|
syslua = 'false'
|
||
| ... | ... | |
|
c_compiler.find_library('SDL2main', dirs: cross_lib_path),
|
||
|
dependency('SDL2')]
|
||
|
else
|
||
|
if emscripten
|
||
|
if host_system == 'emscripten'
|
||
|
emscripten_sdl2_args = [
|
||
|
'-s', 'USE_SDL=2'
|
||
|
]
|
||
| ... | ... | |
|
sdl3main_dep = [c_compiler.find_library('mingw32', dirs: cross_lib_path),
|
||
|
dependency('sdl3')]
|
||
|
else
|
||
|
if emscripten
|
||
|
if host_system == 'emscripten'
|
||
|
emscripten_sdl3_args = [
|
||
|
'-s', 'USE_SDL=3'
|
||
|
]
|
||
| ... | ... | |
|
if get_option('audio') != 'none'
|
||
|
priv_conf_data.set('AUDIO_SDL', 1)
|
||
|
if emscripten
|
||
|
if host_system == 'emscripten'
|
||
|
audio_dep = []
|
||
|
elif get_option('audio') == 'sdl3'
|
||
|
audio_sdl3_dep = dependency('sdl3-mixer')
|
||
| ... | ... | |
|
gettext_dep = []
|
||
|
endif
|
||
|
if emscripten
|
||
|
if host_system == 'emscripten'
|
||
|
sqlite3_dep = []
|
||
|
sqlite3_src = []
|
||
|
curl_dep = []
|
||
| ... | ... | |
|
m_dep = c_compiler.find_library('m', dirs: cross_lib_path)
|
||
|
endif
|
||
|
if not emscripten
|
||
|
if host_system != 'emscripten'
|
||
|
if c_compiler.compiles(net_incl + '''
|
||
|
#include <stddef.h>
|
||
|
#include <curl/curl.h>
|
||
| ... | ... | |
|
sdl2_image_dep = []
|
||
|
sdl2_ttf_dep = []
|
||
|
if not emscripten
|
||
|
if host_system != 'emscripten'
|
||
|
sdl2_gfx_dep = dependency('SDL2_gfx', required: false)
|
||
|
if not sdl2_gfx_dep.found()
|
||
| ... | ... | |
|
sdl3_image_dep = []
|
||
|
sdl3_ttf_dep = []
|
||
|
if not emscripten
|
||
|
if host_system != 'emscripten'
|
||
|
sdl3_gfx_inc = include_directories('dependencies')
|
||
|
sdl3_image_dep = dependency('sdl3-image', required: false)
|
||
- « Previous
- 1
- 2
- Next »