From 2bbaf923f9ee51afc199f4555db6edd43e3adba0 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Sat, 21 Nov 2020 13:19:39 +0000 Subject: Meson build: fix is_os_cocoa detection The previous check didnt work as the compiler choked on the Objective-C code that was dragged in by the Cocoa headers. This patch simplifies things by simply asking what system the host is running on. --- meson.build | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 4d2c13a6..fd253a60 100644 --- a/meson.build +++ b/meson.build @@ -45,21 +45,7 @@ project_build_root = meson.current_build_dir() cpp_compiler = meson.get_compiler('cpp') is_msvc = cpp_compiler.get_id() == 'msvc' is_host_windows = host_machine.system() == 'windows' - -is_os_cocoa = false -if not is_host_windows - # This test for Mac OS is copied from glib. If the result of glib's test - # is ever made available outside glib, use glib's result instead of this test. - # glib: https://bugzilla.gnome.org/show_bug.cgi?id=780309 - # glibmm: https://bugzilla.gnome.org/show_bug.cgi?id=781947 - is_os_cocoa = cpp_compiler.compiles( - '''#include - #ifdef GNUSTEP_BASE_VERSION - #error "Detected GNUstep, not Cocoa" - #endif''', - name: 'Mac OS X Cocoa support' - ) -endif +is_os_cocoa = host_machine.system() == 'darwin' python3 = import('python').find_installation() python_version = python3.language_version() -- cgit v1.2.1