mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-31 10:02:59 +00:00
fix build errors
This commit is contained in:
parent
8315a5ba2b
commit
3e813592e4
38
meson.build
38
meson.build
|
|
@ -18,8 +18,6 @@ python = pymod.find_installation('python3', required: true)
|
|||
|
||||
cc = meson.get_compiler('cpp')
|
||||
|
||||
use_gles = get_option('renderer') == 'gles'
|
||||
|
||||
global_cpp_defs = [
|
||||
'-DSPLIT_SAVES',
|
||||
'-D_LARGE_WORLDS',
|
||||
|
|
@ -33,8 +31,33 @@ if host_machine.system() == 'linux'
|
|||
global_cpp_defs += ['-Dlinux', '-D__linux', '-D__linux__']
|
||||
endif
|
||||
|
||||
if use_gles
|
||||
if get_option('renderer') == 'gles'
|
||||
global_cpp_defs += ['-DGLES']
|
||||
gl_dep = dependency('glesv2', required: true)
|
||||
glu_dep = dependency('', required: false)
|
||||
else
|
||||
gl_dep = dependency('gl', required: true)
|
||||
glu_dep = dependency('glu', required: true)
|
||||
endif
|
||||
|
||||
if get_option('enable_vsync')
|
||||
global_cpp_defs += ['-DENABLE_VSYNC']
|
||||
endif
|
||||
|
||||
if get_option('classic_panorama')
|
||||
global_cpp_defs += '-DCLASSIC_PANORAMA'
|
||||
endif
|
||||
|
||||
if get_option('enable_frame_profiler')
|
||||
global_cpp_defs += ['-DENABLE_FRAME_PROFILER']
|
||||
endif
|
||||
|
||||
if get_option('ui_backend') == 'shiggy'
|
||||
global_cpp_defs += ['-D_ENABLEIGGY']
|
||||
endif
|
||||
|
||||
if get_option('ui_backend') == 'java'
|
||||
global_cpp_defs += '-DENABLE_JAVA_GUIS'
|
||||
endif
|
||||
|
||||
add_project_arguments(global_cpp_defs, language: ['cpp', 'c'])
|
||||
|
|
@ -49,15 +72,6 @@ sdl2_dep = dependency('sdl2')
|
|||
thread_dep = dependency('threads')
|
||||
dl_dep = cc.find_library('dl', required: true)
|
||||
|
||||
# GLES vs Desktop GL
|
||||
if use_gles
|
||||
gl_dep = dependency('glesv2', required: true)
|
||||
glu_dep = dependency('', required: false)
|
||||
else
|
||||
gl_dep = dependency('gl', required: true)
|
||||
glu_dep = dependency('glu', required: true)
|
||||
endif
|
||||
|
||||
stb = subproject('stb').get_variable('stb_inc')
|
||||
stb_dep = declare_dependency(include_directories: stb)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ output_stamp = Path(sys.argv[5])
|
|||
#
|
||||
# this script doesn't handle copying the same way `meson install` does but it should be good enough
|
||||
dest_common = Path(client_build_dir / "Common")
|
||||
src_assets = Path(project_source_root / "minecraft" / "resources")
|
||||
src_assets = Path(project_source_root / "targets" / "resources")
|
||||
|
||||
# clear out any old assets
|
||||
if dest_common.exists():
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@ exclude_sources = [
|
|||
' ! -path "*/Common/*"', # added by platform_sources
|
||||
' ! -path "*/Linux/*"', # added by platform_sources
|
||||
' ! -path "*/Windows64/*"', # added by platform_sources
|
||||
' ! -name "SurvivalMode.cpp"',
|
||||
' ! -name "CreativeMode.cpp"',
|
||||
' ! -name "GameMode.cpp"',
|
||||
' ! -name "DemoMode.cpp"',
|
||||
]
|
||||
|
||||
# all sources except ./Platform/*
|
||||
|
|
@ -64,43 +60,14 @@ client_dependencies = [
|
|||
console_helpers_dep,
|
||||
]
|
||||
|
||||
if get_option('enable_vsync')
|
||||
global_cpp_defs += ['-DENABLE_VSYNC']
|
||||
endif
|
||||
|
||||
if get_option('classic_panorama')
|
||||
global_cpp_defs += '-DCLASSIC_PANORAMA'
|
||||
endif
|
||||
|
||||
if get_option('enable_frame_profiler')
|
||||
global_cpp_defs += ['-DENABLE_FRAME_PROFILER']
|
||||
endif
|
||||
|
||||
if get_option('ui_backend') == 'shiggy'
|
||||
shiggy_dep = dependency(
|
||||
'shiggy',
|
||||
fallback: ['shiggy', 'shiggy_dep'],
|
||||
)
|
||||
|
||||
global_cpp_defs += ['-D_ENABLEIGGY']
|
||||
client_dependencies += shiggy_dep
|
||||
endif
|
||||
|
||||
if get_option('ui_backend') == 'java'
|
||||
global_cpp_defs += '-DENABLE_JAVA_GUIS'
|
||||
endif
|
||||
|
||||
occlusion_mode = get_option('occlusion_culling')
|
||||
if occlusion_mode == 'off'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_NONE']
|
||||
elif occlusion_mode == 'frustum'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_FRUSTUM']
|
||||
elif occlusion_mode == 'bfs'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_BFS', '-DUSE_OCCLUSION_CULLING']
|
||||
elif occlusion_mode == 'hardware'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_HARDWARE', '-DUSE_OCCLUSION_CULLING']
|
||||
endif
|
||||
|
||||
platform_services_src = files('../platform/PlatformServices.cpp')
|
||||
|
||||
client = executable(
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ exclude_sources = [
|
|||
'! -name ZoneFile.cpp',
|
||||
'! -name ZoneIo.cpp',
|
||||
'! -name LevelConflictException.cpp',
|
||||
'! -name "SurvivalMode.cpp"',
|
||||
'! -name "CreativeMode.cpp"',
|
||||
'! -name "GameMode.cpp"',
|
||||
'! -name "DemoMode.cpp"',
|
||||
]
|
||||
|
||||
# GET IT ALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
|
|
@ -25,6 +29,21 @@ minecraft_sources = run_command(
|
|||
check : true,
|
||||
).stdout().strip().split('\n')
|
||||
|
||||
occlusion_mode = get_option('occlusion_culling')
|
||||
if occlusion_mode == 'off'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_NONE']
|
||||
elif occlusion_mode == 'frustum'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_FRUSTUM']
|
||||
elif occlusion_mode == 'bfs'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_BFS', '-DUSE_OCCLUSION_CULLING']
|
||||
elif occlusion_mode == 'hardware'
|
||||
global_cpp_defs += ['-DOCCLUSION_MODE_HARDWARE', '-DUSE_OCCLUSION_CULLING']
|
||||
endif
|
||||
|
||||
if get_option('ui_backend') == 'java'
|
||||
global_cpp_defs += '-DENABLE_JAVA_GUIS'
|
||||
endif
|
||||
|
||||
lib_minecraft = static_library('minecraft',
|
||||
minecraft_sources,
|
||||
dependencies : [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Minecraft;
|
||||
class Level;
|
||||
class Player;
|
||||
|
|
|
|||
Loading…
Reference in a new issue