diff --git a/meson.build b/meson.build index 6a0a0d2..6dfef6c 100644 --- a/meson.build +++ b/meson.build @@ -53,6 +53,11 @@ if shim_behaviour == 'replacement' cdata.set('REPLACE_STEAM', '1') endif +with_libintercept = get_option('with-libintercept') +if with_libintercept == true + cdata.set('HAVE_LIBINTERCEPT', '1') +endif + config_h = configure_file( configuration: cdata, output: 'config.h', diff --git a/meson_options.txt b/meson_options.txt index 381c678..d08e269 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,3 +4,4 @@ option('with-steam-binary', type: 'string', description: 'Set the path to the St option('with-frontend', type: 'boolean', description: 'Build the LSI Settings UI', value: false) option('with-preload-libs', type: 'string', description: 'Colon separated list of libraries required to launch Steam games', value: '/usr/\$LIB/libxcb.so.1:/usr/\$LIB/libX11.so.6:/usr/\$LIB/libstdc++.so.6') +option('with-libintercept', type: 'boolean', description: 'Enable libintercept library for controlling Steam linking', value: true) diff --git a/src/intercept/meson.build b/src/intercept/meson.build index d11b7a8..aef983c 100644 --- a/src/intercept/meson.build +++ b/src/intercept/meson.build @@ -1,10 +1,15 @@ -intercept_sources = [ - 'main.c', -] +# Only build libintercept if told to! -main_intercept = shared_library( - 'lsi-intercept', - sources: intercept_sources + nica_sources, - include_directories: nica_includes, - install: true, -) +if with_libintercept == true + + intercept_sources = [ + 'main.c', + ] + + main_intercept = shared_library( + 'lsi-intercept', + sources: intercept_sources + nica_sources, + include_directories: nica_includes, + install: true, + ) +endif