From 09ac8336a3699effdb576c2b3f45aa279aee7301 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:02:42 -0500 Subject: [PATCH] fix: only link libshiggy if enable_shiggy is true --- Minecraft.Client/meson.build | 32 +++++++++++++++++++++----------- meson.build | 8 -------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Minecraft.Client/meson.build b/Minecraft.Client/meson.build index c71440aec..0fd9a45e3 100644 --- a/Minecraft.Client/meson.build +++ b/Minecraft.Client/meson.build @@ -45,15 +45,7 @@ if host_machine.system() == 'linux' ).stdout().strip().split('\n') endif -shiggy_dep = dependency( - 'shiggy', - fallback : ['shiggy', 'shiggy_dep'], -) - -client = executable('Minecraft.Client', - client_sources + platform_sources + localisation[1], - include_directories : include_directories('Platform', 'Platform/Linux/Iggy/include'), - dependencies : [ +client_dependencies = [ render_dep, input_dep, profile_dep, @@ -64,9 +56,27 @@ client = executable('Minecraft.Client', glu_dep, thread_dep, thread_dep, - shiggy_dep, dependency('zlib'), - ], +] + +if get_option('enable_vsync') + global_cpp_defs += '-DENABLE_VSYNC' +endif + +if get_option('enable_shiggy') + shiggy_dep = dependency( + 'shiggy', + fallback : ['shiggy', 'shiggy_dep'], + ) + + global_cpp_defs += '-D_ENABLEIGGY' + client_dependencies += shiggy_dep +endif + +client = executable('Minecraft.Client', + client_sources + platform_sources + localisation[1], + include_directories : include_directories('Platform', 'Platform/Linux/Iggy/include'), + dependencies : client_dependencies, cpp_args : global_cpp_args + global_cpp_defs + [ '-DUNICODE', '-D_UNICODE', '-include', meson.current_source_dir() / 'Platform/stdafx.h', diff --git a/meson.build b/meson.build index 3b2913a2d..965d30fb9 100644 --- a/meson.build +++ b/meson.build @@ -38,14 +38,6 @@ global_cpp_defs = [ '-DDEBUG', ] -if get_option('enable_vsync') - global_cpp_defs += '-DENABLE_VSYNC' -endif - -if get_option('enable_iggy') - global_cpp_defs += '-D_ENABLEIGGY' -endif - if host_machine.system() == 'linux' global_cpp_defs += [ '-Dlinux',