From a85ab9295ea0b34f1c6a2681aff28e09924fcfdb Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 30 Aug 2016 10:23:00 +0200 Subject: [PATCH] meson: better way to add math library dep. --- meson.build | 5 +++-- src/meson.build | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index ccee548..9cb99ed 100644 --- a/meson.build +++ b/meson.build @@ -1,12 +1,13 @@ project('libzakutils', 'c', version: '0.0.1') -add_global_link_arguments('-lm', language: 'c') - glib_dep = dependency('glib-2.0') gobject_dep = dependency('gobject-2.0') gio_dep = dependency('gio-2.0') +cc = meson.get_compiler('c') +m_dep = cc.find_library('m', required : false) + inc = include_directories('src') subdir('src') diff --git a/src/meson.build b/src/meson.build index 031ec9a..381b1c2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -5,5 +5,5 @@ libzakutils_sources = ['datetime.c', 'generic.c'] libzakutils = shared_library ('zakutils', libzakutils_sources, - dependencies: [glib_dep, gobject_dep, gio_dep], + dependencies: [glib_dep, gobject_dep, gio_dep, m_dep], install: true) \ No newline at end of file -- 2.49.0