diff options
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 1c4ea10..07f4390 100644 --- a/meson.build +++ b/meson.build @@ -48,7 +48,15 @@ if system == 'linux' deps += [wl_client, wl_cursor, xkbcommon] endif elif system == 'darwin' - add_languages('objc') + add_languages('objc', native: false) + if not cc.compiles(''' + #if !defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000 + #error YASL requires macOS 14 or newer + #endif + int main(void) { return 0; } + ''', name: 'macOS deployment target is at least 14') + error('Cocoa requires macOS 14 or newer. Set MACOSX_DEPLOYMENT_TARGET=14.0 or a newer target before configuring.') + endif deps += [ dependency('appleframeworks', modules: ['AppKit', 'Metal', 'QuartzCore']), ] @@ -84,6 +92,7 @@ yasl_lib = both_libraries( install_headers( 'include/yasl/yasl.h', 'include/yasl/timing.h', + 'include/yasl/keycodes.h', 'include/yasl/loop.h', 'include/yasl/native.h', subdir: 'yasl', @@ -115,6 +124,13 @@ yasl_dep = declare_dependency( ) meson.override_dependency('yasl', yasl_dep) +hello_example = executable( + 'yasl-hello', + 'examples/hello.c', + include_directories: inc, + link_with: yasl_lib.get_shared_lib(), +) + executable( 'yasl-example', 'examples/simple_window.c', @@ -130,3 +146,11 @@ tablet_example = executable( ) subdir('tests') + +doc_dir = get_option('datadir') / 'doc' / 'yasl' +install_data('README.md', 'CONTRIBUTING.md', 'Doxyfile', 'LICENSE', install_dir: doc_dir) +# Preserve source-relative links and keep the reference buildable offline. +install_subdir('docs', install_dir: doc_dir) +install_subdir('examples', install_dir: doc_dir) +install_subdir('include', install_dir: doc_dir) +install_data('LICENSE', install_dir: get_option('datadir') / 'licenses' / 'yasl') |
