diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 01795c875feb1300b9c5e42f0804d5aee2940d4e..1c3e768540b1903f0606e32d8ca78e7074469a54 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -617,7 +617,7 @@ nodist_libqt_plugin_la_SOURCES += \
 	maininterface/compositor_wayland.moc.cpp
 
 libqt_wayland_plugin_la_CFLAGS = $(AM_CFLAGS) $(WAYLAND_CLIENT_CFLAGS)
-libqt_wayland_plugin_la_LIBADD =  $(WAYLAND_CLIENT_LIBS)
+libqt_wayland_plugin_la_LIBADD =  $(WAYLAND_CLIENT_LIBS) $(LIBM)
 libqt_wayland_plugin_la_SOURCES = \
 	maininterface/qt_wayland_plugin.c \
 	maininterface/compositor_wayland_module.c \