--- CMakeLists.txt.orig	2009-11-01 05:50:26 UTC
+++ CMakeLists.txt
@@ -50,9 +50,11 @@ PKG_CHECK_MODULES(GTHREAD REQUIRED gthre
 
 INCLUDE_DIRECTORIES(${X11_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS}
 	${GLIB_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS})
+LINK_DIRECTORIES(${X11_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}
+	${GLIB_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS} ${PANGO_LIBRARY_DIRS})
 	
 ADD_EXECUTABLE(${BMPANEL_EXECUTABLE_NAME} ${SOURCES})
-TARGET_LINK_LIBRARIES(${BMPANEL_EXECUTABLE_NAME} ${X11_LIBRARIES}
+TARGET_LINK_LIBRARIES(${BMPANEL_EXECUTABLE_NAME} -lm ${X11_LIBRARIES}
 	${CAIRO_LIBRARIES} ${GLIB_LIBRARIES} ${GTHREAD_LIBRARIES} ${PANGO_LIBRARIES})
 
 # OPTIONS
