diff options
author | David Robillard <d@drobilla.net> | 2024-06-10 09:25:23 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-10 09:31:17 -0400 |
commit | 55245b99cc4e7992f34244b773eeb510f3af8904 (patch) | |
tree | aa00d32ab8816912bb5755bf4b6aef6219984c65 /meson.build | |
parent | c46b41787cac270638ef7151782357636cf1be77 (diff) | |
download | pugl-main.tar.gz pugl-main.tar.bz2 pugl-main.zip |
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/meson.build b/meson.build index e3b8450..78c6d7c 100644 --- a/meson.build +++ b/meson.build @@ -56,6 +56,7 @@ add_project_arguments( core_args = [] dl_dep = cc.find_library('dl', required: false) +with_timers = true if host_machine.system() == 'darwin' # MacOS @@ -173,15 +174,12 @@ else core_args += '-D_POSIX_C_SOURCE=200809L' xcursor_dep = cc.find_library('Xcursor', required: get_option('xcursor')) - if xcursor_dep.found() - core_args += ['-DUSE_XCURSOR=1'] - endif + core_args += ['-DUSE_XCURSOR=@0@'.format(xcursor_dep.found().to_int())] xrandr_dep = cc.find_library('Xrandr', required: get_option('xrandr')) - if xrandr_dep.found() - core_args += ['-DUSE_XRANDR=1'] - endif + core_args += ['-DUSE_XRANDR=@0@'.format(xrandr_dep.found().to_int())] + with_timers = false use_xsync = false xext_dep = cc.find_library('Xext', required: get_option('xsync')) if xext_dep.found() @@ -189,12 +187,13 @@ else #include <X11/extensions/sync.h> int main(void) { XSyncQueryExtension(0, 0, 0); return 0; }''' if cc.compiles(xsync_fragment, name: 'Xsync') - core_args += ['-DUSE_XSYNC=1'] + with_timers = true use_xsync = true elif get_option('xsync') == 'enabled' error('C header <X11/extensions/sync.h> not found') endif endif + core_args += ['-DUSE_XSYNC=@0@'.format(use_xsync.to_int())] x11_args = [] if cc.get_id() == 'clang' |