From a7d6a48321afcfdb4bc6cede664a75f40dccb8ce Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Mon, 19 Apr 2021 08:12:55 +0200 Subject: [PATCH] Add objective-c languange in meson only for macos --- meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index e9beee87..1f31b509 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,8 @@ -project('lite', 'c', 'cpp', 'objc', default_options : ['c_std=gnu11', 'cpp_std=c++03']) +project('lite', 'c', 'cpp', default_options : ['c_std=gnu11', 'cpp_std=c++03']) + +if host_machine.system() == 'darwin' + add_languages('objc') +endif cc = meson.get_compiler('c') libm = cc.find_library('m', required : false) @@ -7,9 +11,7 @@ libx11 = dependency('x11', required : false) lua_dep = dependency('lua5.2', required : false) if not lua_dep.found() - lua_subproject = subproject('lua', default_options: [ - 'shared=false', 'use_readline=false', 'app=false' - ]) + lua_subproject = subproject('lua', default_options: ['shared=false', 'use_readline=false', 'app=false']) lua_dep = lua_subproject.get_variable('lua_dep') endif