[glibmm: 1/2] Meson build: fix is_os_cocoa detection
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm: 1/2] Meson build: fix is_os_cocoa detection
- Date: Sun, 22 Nov 2020 15:11:10 +0000 (UTC)
commit 2bbaf923f9ee51afc199f4555db6edd43e3adba0
Author: Tom Schoonjans <Tom Schoonjans rfi ac uk>
Date: Sat Nov 21 13:19:39 2020 +0000
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 <Cocoa/Cocoa.h>
- #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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]