[libdazzle: 1/2] build: set PLATFORM_OSX on macOS
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle: 1/2] build: set PLATFORM_OSX on macOS
- Date: Thu, 10 Jun 2021 23:04:17 +0000 (UTC)
commit 62eb186757b525c20d3c029392bf3ebf04406b85
Author: Tom Schoonjans <Tom Schoonjans rfi ac uk>
Date: Thu Jun 10 08:59:27 2021 +0100
build: set PLATFORM_OSX on macOS
Since this will add some objective-c code to the build, compilation must
then occur with the -xobjective-c flag.
meson.build | 6 ++++++
src/meson.build | 4 ++++
2 files changed, 10 insertions(+)
---
diff --git a/meson.build b/meson.build
index 3296ad5..9a2c157 100644
--- a/meson.build
+++ b/meson.build
@@ -39,6 +39,12 @@ add_project_arguments([
'-DDAZZLE_COMPILATION',
], language: 'c')
+if host_machine.system() == 'darwin'
+ add_project_arguments([
+ '-DPLATFORM_OSX',
+ ], language: 'c')
+endif
+
root_inc = include_directories('.')
src_inc = include_directories('src')
diff --git a/src/meson.build b/src/meson.build
index b7e298d..eeb20c5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -97,6 +97,10 @@ if get_option('enable_rdtscp')
libdazzle_args += '-DDZL_HAVE_RDTSCP'
endif
+if host_machine.system() == 'darwin'
+ libdazzle_args += '-xobjective-c'
+endif
+
libdazzle = shared_library(
'dazzle-' + apiversion,
libdazzle_sources,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]