rewrote & formatted meson, also added gles to renderer, no need to touch, it works, and it'll help for future support. basically a neat lil touch

This commit is contained in:
JuiceyDev
2026-03-29 20:55:58 -05:00
committed by Tropical
parent e2a6c3f92c
commit 4aa8106e52
4 changed files with 146 additions and 97 deletions
+46 -20
View File
@@ -1,7 +1,9 @@
project('4jcraft-chucklegrounds', ['cpp', 'c'],
version : '0.1.0',
project(
'4jcraft',
['cpp', 'c'],
version: '0.1.0',
meson_version: '>= 1.7',
default_options : [
default_options: [
'cpp_std=c++23',
'warning_level=0',
'buildtype=debug', # for now
@@ -16,22 +18,6 @@ python = pymod.find_installation('python3', required: true)
cc = meson.get_compiler('cpp')
# system deps
gl_dep = dependency('gl')
glu_dep = dependency('glu')
sdl2_dep = dependency('sdl2') # Yes.. i know sdl3 is out, but there's not point upgrading right now except when
# someone is gonna ask me "Hey juicey can you make it SDL3?" and i'd be like fuck you and still do it.
thread_dep = dependency('threads')
miniaudio_dep = dependency('miniaudio')
stb = subproject('stb').get_variable('stb_inc')
# compile flags (chagne ts juicey)
global_cpp_args = [
'-fpermissive',
'-Wshift-count-overflow',
'-pipe', # use pipes instead of temp files between compiler stages
]
# global ccp defs type shi
global_cpp_defs = [
'-DSPLIT_SAVES',
'-D_LARGE_WORLDS',
@@ -49,11 +35,51 @@ if host_machine.system() == 'linux'
]
endif
add_project_arguments(global_cpp_defs, language: ['cpp', 'c'])
global_cpp_args = [
'-fpermissive',
'-Wshift-count-overflow',
'-pipe',
]
add_project_arguments(global_cpp_args, language: 'cpp')
sdl2_dep = dependency('sdl2')
thread_dep = dependency('threads')
dl_dep = cc.find_library('dl', required: true)
if '-DGLES' in global_cpp_defs
gl_dep = dependency('glesv2')
glu_dep = dependency('', required: false)
else
gl_dep = dependency('gl')
glu_dep = dependency('glu')
endif
stb = subproject('stb').get_variable('stb_inc')
stb_dep = declare_dependency(include_directories: stb)
miniaudio_dep = dependency('miniaudio')
render_dep = dependency('4j-render', fallback: ['4jlibs', 'render_dep'])
input_dep = dependency('4j-input', fallback: ['4jlibs', 'input_dep'])
profile_dep = dependency('4j-profile', fallback: ['4jlibs', 'profile_dep'])
storage_dep = dependency('4j-storage', fallback: ['4jlibs', 'storage_dep'])
all_deps = [
gl_dep,
glu_dep,
sdl2_dep,
thread_dep,
dl_dep,
stb_dep,
miniaudio_dep,
render_dep,
input_dep,
profile_dep,
storage_dep,
]
subdir('Minecraft.Assets')
subdir('Minecraft.World')
subdir('Minecraft.Client')
subdir('Minecraft.Client')