[Mesa-dev] [PATCH mesa-demos] cmake: fix egl/opengl compilation (needs -lm)

Paulo Zanoni pzanoni at mandriva.com
Fri Jan 28 12:08:50 PST 2011

Signed-off-by: Paulo Zanoni <pzanoni at mandriva.com>

My cmake-fu is not good. Maybe there are better ways to fix this. Suggestions
are always welcome =D

 src/egl/opengl/CMakeLists.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/egl/opengl/CMakeLists.txt b/src/egl/opengl/CMakeLists.txt
index ede9ec3..3a012e1 100644
--- a/src/egl/opengl/CMakeLists.txt
+++ b/src/egl/opengl/CMakeLists.txt
@@ -6,10 +6,10 @@ add_executable(eglinfo eglinfo.c)
 target_link_libraries(eglinfo ${EGL_egl_LIBRARY})
 add_executable(eglgears_screen eglgears.c)
-target_link_libraries(eglgears_screen ${EGL_egl_LIBRARY} eglut_screen)
+target_link_libraries(eglgears_screen ${EGL_egl_LIBRARY} eglut_screen m)
   add_executable(eglgears_x11 eglgears.c)
-  target_link_libraries(eglgears_x11 ${EGL_egl_LIBRARY} eglut_x11)
+  target_link_libraries(eglgears_x11 ${EGL_egl_LIBRARY} eglut_x11 m)

More information about the mesa-dev mailing list