[Kde-hardware-devel] [kde-workspace] powerdevil/daemon: Use some udev includes and libraries only when udev has been found.
Raphael Kubo da Costa
rakuco at FreeBSD.org
Sun May 19 16:31:24 UTC 2013
Git commit 3ac7064bfd0dff5e607e3a564483fcee82bb0ec6 by Raphael Kubo da Costa.
Committed on 19/05/2013 at 18:30.
Pushed by rkcosta into branch 'master'.
Use some udev includes and libraries only when udev has been found.
CCMAIL: kde-hardware-devel at kde.org
M +4 -1 powerdevil/daemon/CMakeLists.txt
M +2 -0 powerdevil/daemon/powerdevilbackendloader.cpp
http://commits.kde.org/kde-workspace/3ac7064bfd0dff5e607e3a564483fcee82bb0ec6
diff --git a/powerdevil/daemon/CMakeLists.txt b/powerdevil/daemon/CMakeLists.txt
index 0252063..d0274eb 100644
--- a/powerdevil/daemon/CMakeLists.txt
+++ b/powerdevil/daemon/CMakeLists.txt
@@ -80,10 +80,13 @@ kde4_add_plugin(kded_powerdevil ${kded_powerdevil_SRCS} ${POWERDEVIL_BACKEND_SRC
target_link_libraries(kded_powerdevil
${KDE4_KDECORE_LIBS}
${POWERDEVIL_BACKEND_LIBS}
- ${UDEV_LIBS}
powerdevilcore
)
+if (UDEV_FOUND)
+ target_link_libraries(kded_powerdevil ${UDEV_LIBS})
+endif (UDEV_FOUND)
+
install(TARGETS kded_powerdevil DESTINATION ${PLUGIN_INSTALL_DIR})
install(TARGETS powerdevilcore ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/powerdevil/daemon/powerdevilbackendloader.cpp b/powerdevil/daemon/powerdevilbackendloader.cpp
index 0e1c67f..11c2798 100644
--- a/powerdevil/daemon/powerdevilbackendloader.cpp
+++ b/powerdevil/daemon/powerdevilbackendloader.cpp
@@ -20,7 +20,9 @@
#include "powerdevilbackendloader.h"
+#ifdef HAVE_UDEV
#include "backends/upower/powerdevilupowerbackend.h"
+#endif
#include "backends/hal/powerdevilhalbackend.h"
#include <config-powerdevil.h>
More information about the Kde-hardware-devel
mailing list