diff --git a/src/tr1/meson.build b/src/tr1/meson.build index 8d64aa758..adb10b8ea 100644 --- a/src/tr1/meson.build +++ b/src/tr1/meson.build @@ -7,8 +7,11 @@ project( ], ) +staticdeps = get_option('staticdeps') + trx = subproject('libtrx', default_options: { 'tr_version': '1', + 'staticdeps': staticdeps, }) c_compiler = meson.get_compiler('c') @@ -24,8 +27,6 @@ build_opts = [ add_project_arguments(build_opts, language: 'c') -staticdeps = get_option('staticdeps') - # Always dynamically link on macOS if host_machine.system() == 'darwin' staticdeps = false diff --git a/src/tr2/meson.build b/src/tr2/meson.build index ae9389b41..b11690317 100644 --- a/src/tr2/meson.build +++ b/src/tr2/meson.build @@ -5,8 +5,11 @@ project('TR2X', ['c'], ], ) +staticdeps = get_option('staticdeps') + trx = subproject('libtrx', default_options: { 'tr_version': '2', + 'staticdeps': staticdeps, }) c_compiler = meson.get_compiler('c') @@ -22,8 +25,6 @@ build_opts = [ add_project_arguments(build_opts, language: 'c') -staticdeps = get_option('staticdeps') - null_dep = dependency('', required: false) dep_trx = trx.get_variable('dep_trx') dep_sdl2 = dependency('SDL2', static: staticdeps)