[atomix] meson: add missing -lm depend for atomix binary



commit 72c53b4a36673f0f7a7d54f42c38078a395b1c55
Author: Sergei Trofimovich <slyich gmail com>
Date:   Sat May 7 07:56:46 2022 +0100

    meson: add missing -lm depend for atomix binary
    
    Without the change linkage fails on clang-13 as:
    
        ld: src/libatomix.a.p/canvas_helper.c.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5'
        ld: ...-glibc-2.34-115/lib/libm.so.6: error adding symbols: DSO missing from command line

 meson.build     | 1 +
 src/meson.build | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/meson.build b/meson.build
index 35e72ef..40737ac 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,7 @@ glib_dep = dependency('glib-2.0', version: '>= 2.36.0')
 libgnome_games_support_dep = dependency('libgnome-games-support-1')
 
 cc = meson.get_compiler('c')
+libm_dep = cc.find_library('m', required : false)
 
 conf = configuration_data()
 
diff --git a/src/meson.build b/src/meson.build
index 68fabad..c4e8204 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -31,6 +31,7 @@ app_dependencies = [
     glib_dep,
     gdk_pixbuf_dep,
     libgnome_games_support_dep,
+    libm_dep,
 ]
 
 atomix_lib = static_library('atomix', library_sources,


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