[json-glib/wip/ordered-iter] build: Maintain Autotools compatibility on Darwin



commit 62f5c93d261ebfd91d31a4c73ed7413b0d830a62
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Aug 24 16:03:44 2020 +0100

    build: Maintain Autotools compatibility on Darwin
    
    JSON-GLib 1.2 was the last release using Autotools on Darwin, which
    means we cannot use "1" as the compatibility version argument. Use
    '201', instead, and while at it, use the appropriate argument for
    `library()` instead of doing the work ourselves.
    
    Fixes: #41

 json-glib/meson.build | 4 ++++
 meson.build           | 8 --------
 2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/json-glib/meson.build b/json-glib/meson.build
index 6cef755..4a2b2e5 100644
--- a/json-glib/meson.build
+++ b/json-glib/meson.build
@@ -78,6 +78,10 @@ json_lib = library(
   dependencies: [gio_dep],
   c_args: json_c_args + common_cflags,
   link_args: common_ldflags,
+  darwin_versions: [
+    201, # The last Autotools release on Darwin
+    '@0@.@1@'.format(json_binary_age - json_interface_age, json_interface_age),
+  ],
   install: true,
 )
 
diff --git a/meson.build b/meson.build
index 31ac1b3..bb58bae 100644
--- a/meson.build
+++ b/meson.build
@@ -144,14 +144,6 @@ if host_system == 'linux'
   ])
 endif
 
-# Maintain compatibility with autotools
-if host_system == 'darwin'
-  common_ldflags += [
-    '-compatibility_version 1',
-    '-current_version @0@.@1@'.format(json_binary_age - json_interface_age, json_interface_age),
-  ]
-endif
-
 root_dir = include_directories('.')
 
 gnome = import('gnome')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]