[gnome-tetravex/wip/kalev/libm: 2/2] meson: Explicitly link with -lm



commit 1a117e44fcaf59359b50ccbd00b922d7c7ee4fb4
Author: Kalev Lember <klember redhat com>
Date:   Mon Feb 4 12:02:52 2019 +0100

    meson: Explicitly link with -lm
    
    This was lost in the autotools to meson change. gnome-tetravex uses
    floor() and needs to link with -lm for that.

 meson.build     | 3 +++
 src/meson.build | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 3ea7712..7b2b1fe 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,9 @@ datadir = join_paths (get_option ('prefix'), get_option ('datadir'))
 glib_dep = dependency ('glib-2.0', version: '>= 2.40.0')
 gtk_dep = dependency ('gtk+-3.0', version: '>= 3.14')
 
+cc = meson.get_compiler('c')
+libm_dep = cc.find_library('m')
+
 subdir ('po')
 subdir ('data')
 subdir ('help')
diff --git a/src/meson.build b/src/meson.build
index f5f9b7a..2b258f8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -11,7 +11,8 @@ gnome_tetravex = executable ('gnome-tetravex',
                                'score-dialog.vala',
                                'theme.vala'] + resources,
                              dependencies: [ glib_dep,
-                                             gtk_dep ],
+                                             gtk_dep,
+                                             libm_dep ],
                              vala_args: [ '--pkg=posix' ],
                              c_args: [ '-DVERSION="@0@"'.format (meson.project_version ()),
                                        '-DGETTEXT_PACKAGE="gnome-tetravex"',


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