From: Andrea Zagli Date: Tue, 30 Aug 2016 08:23:00 +0000 (+0200) Subject: meson: better way to add math library dep. X-Git-Tag: v0.0.2~1^2~8 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=a85ab9295ea0b34f1c6a2681aff28e09924fcfdb;p=libzakutils meson: better way to add math library dep. --- 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