refactor: clean up meson build scripts, use in-tree zlib
This commit is contained in:
+22
-17
@@ -1,33 +1,38 @@
|
||||
# sources that shouldn't be compiled for whatever reason
|
||||
exclude_sources = [
|
||||
'! -name DurangoStats.cpp', # Durango-specific
|
||||
|
||||
# Incomplete/Unused
|
||||
'! -name SkyIslandDimension.cpp',
|
||||
'! -name MemoryChunkStorage.cpp',
|
||||
'! -name MemoryLevelStorage.cpp',
|
||||
'! -name MemoryLevelStorageSource.cpp',
|
||||
'! -name NbtSlotFile.cpp',
|
||||
'! -name ZonedChunkStorage.cpp',
|
||||
'! -name ZoneFile.cpp',
|
||||
'! -name ZoneIo.cpp',
|
||||
]
|
||||
|
||||
# GET IT ALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
# Note: the files below are commented-out in CMakeLists.txt (missing headers or
|
||||
# unfinished ports) and must be excluded from the build.
|
||||
_world_sources_raw = run_command(
|
||||
# TODO: make this process more portable using a python script :3
|
||||
world_sources = run_command(
|
||||
'sh', '-c',
|
||||
'find "' + meson.current_source_dir() + '" -name "*.cpp"' +
|
||||
' ! -name "DurangoStats.cpp"' +
|
||||
' ! -name "MemoryChunkStorage.cpp"' +
|
||||
' ! -name "MemoryLevelStorage.cpp"' +
|
||||
' ! -name "MemoryLevelStorageSource.cpp"' +
|
||||
' ! -name "NbtSlotFile.cpp"' +
|
||||
' ! -name "SkyIslandDimension.cpp"' +
|
||||
' ! -name "ZonedChunkStorage.cpp"' +
|
||||
' ! -name "ZoneFile.cpp"' +
|
||||
' ! -name "ZoneIo.cpp"',
|
||||
'find "'
|
||||
+ meson.current_source_dir()
|
||||
+ '" \\( -name "*.cpp" -o -name "*.c" \\) '
|
||||
+ ' '.join(exclude_sources),
|
||||
check : true,
|
||||
).stdout().strip().split('\n')
|
||||
|
||||
lib_world = static_library('Minecraft.World',
|
||||
_world_sources_raw,
|
||||
world_sources,
|
||||
include_directories : include_directories('Build', 'Build/x64headers'),
|
||||
cpp_args : global_cpp_args + global_cpp_defs + [
|
||||
'-include', meson.current_source_dir() / 'Build/stdafx.h',
|
||||
],
|
||||
)
|
||||
|
||||
dep_zlib = dependency('zlib')
|
||||
|
||||
world_dep = declare_dependency(
|
||||
link_with : lib_world,
|
||||
dependencies : [dep_zlib],
|
||||
include_directories : include_directories('Build/x64headers'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user