mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-10 19:07:12 +00:00
75 lines
2.1 KiB
Meson
75 lines
2.1 KiB
Meson
# Source lists live in common_sources.txt and are
|
|
# regenerated by scripts/list_sources.py whenever files are added or
|
|
# removed.
|
|
fs = import('fs')
|
|
|
|
app_common_sources = files(fs.read('common_sources.txt').strip().split('\n'))
|
|
app_dependencies = []
|
|
app_link_args = []
|
|
|
|
# mimalloc must come first so the linker resolves malloc/free symbols to it
|
|
# before glibc. --no-as-needed prevents the linker from dropping it as
|
|
# "unreferenced" (the override happens via weak symbols, not direct calls).
|
|
mimalloc_dep = dependency('mimalloc', required: get_option('enable_mimalloc'))
|
|
if mimalloc_dep.found()
|
|
app_dependencies += mimalloc_dep
|
|
endif
|
|
|
|
if get_option('ui_backend') == 'shiggy'
|
|
app_dependencies += dependency(
|
|
'shiggy',
|
|
fallback: ['shiggy', 'shiggy_dep'],
|
|
)
|
|
endif
|
|
|
|
app_dependencies += [
|
|
dependency('sdl2'), # blame iggy gdraw, nuke this later
|
|
dependency('miniaudio'), # todo: remove once PlatformSound is used
|
|
dependency('stb'),
|
|
dependency('simdutf'),
|
|
dependency('glew'), # TODO remove
|
|
java_dep,
|
|
nbt_dep,
|
|
util_dep,
|
|
minecraft_dep,
|
|
assets_localisation_dep,
|
|
platform_fs_dep,
|
|
platform_game_dep,
|
|
platform_input_dep,
|
|
platform_leaderboard_dep,
|
|
platform_network_dep,
|
|
platform_profile_dep,
|
|
platform_renderer_dep,
|
|
platform_sound_dep,
|
|
platform_storage_dep,
|
|
platform_thread_dep,
|
|
# technically also GL/EGL, but the GL renderer needs to not leak GL shit to fix that
|
|
]
|
|
|
|
app = executable(
|
|
'Minecraft.Client',
|
|
app_common_sources + app_platform_sources + localisation[1],
|
|
include_directories: include_directories('..'),
|
|
dependencies: app_dependencies,
|
|
cpp_args: global_cpp_args + global_cpp_defs,
|
|
link_args: app_link_args,
|
|
install: true,
|
|
install_dir: '',
|
|
)
|
|
|
|
custom_target(
|
|
'copy_assets_to_app',
|
|
input: [app, media_archive],
|
|
output: 'assets.stamp',
|
|
command: [
|
|
python,
|
|
meson.project_source_root() / 'scripts/copy_assets_to_app.py',
|
|
meson.project_source_root(),
|
|
meson.project_build_root(),
|
|
meson.current_build_dir(),
|
|
'@INPUT1@',
|
|
'@OUTPUT@',
|
|
],
|
|
build_by_default: true,
|
|
)
|