More on making dkp non required
authorEnrico Zini <enrico@enricozini.org>
Fri, 18 Dec 2009 11:15:26 +0000 (11:15 +0000)
committerEnrico Zini <enrico@enricozini.org>
Fri, 18 Dec 2009 11:15:26 +0000 (11:15 +0000)
README
src/CMakeLists.txt

diff --git a/README b/README
index e58739be3dba45d4a1214a1efbda39547e2dfb4f..4c91de76fa1eb04077cf522a18613b531733043f 100644 (file)
--- a/README
+++ b/README
@@ -159,6 +159,7 @@ TODO list / wish list
     + do the watching/triggering taking code from devkit-power
     + do the parsing hardcoded
     + devkit-power conditional compilation
+    - make devkit-power NOT required
     - remove libdevkit-power-gobject1 from the phone
  - fisheye list music player
     - player page with seek/skip controls
index 62050819afe433e35981b3d376bf0690da49a20d..5bd4bd89b591826c487d923fbb3ab476d80cfa73 100644 (file)
@@ -3,7 +3,7 @@ include(../vala.cmake)
 
 set(zavai_version 0.1)
 
-set(packages gtk+-2.0 dbus-glib-1>=0.80 libwnck-1.0>=2.26.0 devkit-power-gobject>=010 libomhacks)
+set(packages gtk+-2.0 dbus-glib-1>=0.80 libwnck-1.0>=2.26.0 libomhacks)
 add_packages(ZAVAI ${packages})
 
 set(VALA_PACKAGES ${packages} posix linux-input dbus-extra gtkfisheyelist)
@@ -11,12 +11,15 @@ set(VFLAGS --vapidir=${zavai_SOURCE_DIR} --vapidir=${gtkfisheyelist_BINARY_DIR})
 add_definitions(-Wall)
 # -Werror 
 
-if (ZAVAI_devkit-power-gobject_VERSION)
-  message("Using devkit-power-gobject version ${ZAVAI_devkit-power-gobject_VERSION}")
-  add_definitions(-DUSE_DKP)
+pkg_check_modules(DKP devkit-power-gobject>=010)
+if (DKP_VERSION)
+  message("-- Using devkit-power-gobject version ${DKP_VERSION}")
   set(VFLAGS ${VFLAGS} --define=USE_DKP)
+  set(VALA_PACKAGES ${VALA_PACKAGES} devkit-power-gobject)
+  add_definitions(-DUSE_DKP ${DKP_CFLAGS})
+  link_libraries(${DKP_LDFLAGS})
 else()
-  message("Not using devkit-power-gobject")
+  message("-- Not using devkit-power-gobject")
 endif ()
 
 file(GLOB libvala [a-y]*.vala widgets/*.vala)