diff options
author | FeralChild64 <unknown> | 2022-10-07 08:29:11 +0300 |
---|---|---|
committer | kcgen <1557255+kcgen@users.noreply.github.com> | 2022-10-22 21:15:34 +0300 |
commit | b2e3cef0eb5b297eed194c92e6fd16254bd50910 (patch) | |
tree | e9298418e2a39c4c70820323f3b1fadda64a31ea /meson.build | |
parent | 1d8a5cfa903398d82513f86a155b22abec6901eb (diff) |
Add mouse mapper, config tool and config section
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 2c0a49bca..e79a404a2 100644 --- a/meson.build +++ b/meson.build @@ -528,6 +528,14 @@ endif coreaudio_dep = optional_dep coremidi_dep = optional_dep corefoundation_dep = optional_dep +iokit_dep = optional_dep +iokit_code = ''' +#include <IOKit/hid/IOHIDLib.h> +int main() { + dispatch_block_t test_var; + return 0; +} +''' if host_machine.system() == 'darwin' # ObjectiveC parsing, if possible @@ -569,6 +577,31 @@ if host_machine.system() == 'darwin' endif summary('CoreMIDI support', coremidi_dep.found()) + # IOKit + iokit_dep = dependency( + 'appleframeworks', + modules: ['IOKit'], + required: false, + ) + if iokit_dep.found() + if cxx.check_header('IOKit/IOKitLib.h') + is_iokit_compilable = cxx.links( + iokit_code, + name: 'compiler is capable of compiling IOKit', + ) + if is_iokit_compilable + conf_data.set('C_IOKIT', 1) + else + warning('''IOKit disabled because compiler cannot handle it''') + endif + else + warning('''IOKit disabled because header is unusable''') + endif + else + warning('''IOKit disabled because Apple Framework missing''') + endif + summary('IOKit support', iokit_dep.found()) + # Locale discovery corefoundation_dep = dependency( 'appleframeworks', @@ -615,6 +648,16 @@ if host_machine.system() == 'darwin' endif endif +# Determine if system is capable of using ManyMouse library +conf_data.set10('C_MANYMOUSE', true) +if host_machine.system() == 'darwin' + if not conf_data.has('C_IOKIT') + # On OSX the ManyMouse library requires IOKit + conf_data.set10('C_MANYMOUSE', false) + endif +endif +summary('ManyMouse support', conf_data.get('C_MANYMOUSE') == true) + # Linux-only dependencies alsa_dep = optional_dep using_linux = (host_machine.system() == 'linux') @@ -654,6 +697,9 @@ subdir('src/libs/residfp') subdir('src/libs/sdlcd') subdir('src/libs/whereami') subdir('src/libs/YM7128B_emu') +if conf_data.get('C_MANYMOUSE') == true + subdir('src/libs/manymouse') +endif # ZMBV and TalChorus use some support functionality from misc subdir('src/misc') @@ -677,6 +723,10 @@ third_party_deps = [ libtalchorus_dep, ] +if conf_data.get('C_MANYMOUSE') == true + third_party_deps += manymouse_dep +endif + # internal libs subdir('src/cpu') subdir('src/dos') |