summaryrefslogtreecommitdiff
path: root/README.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'README.cmake')
-rw-r--r--README.cmake26
1 files changed, 25 insertions, 1 deletions
diff --git a/README.cmake b/README.cmake
index 55427df7..facfaf09 100644
--- a/README.cmake
+++ b/README.cmake
@@ -2,7 +2,7 @@ This file describes how to compile dbus using the cmake build system
Requirements
------------
-- cmake version >= 2.4.4 see http://www.cmake.org
+- cmake version >= 2.6.0 see http://www.cmake.org
- installed libexpat see http://sourceforge.net/projects/expat/
unsupported RelWithDebInfo builds could be fetched
from http://sourceforge.net/projects/kde-windows/files/expat/
@@ -171,3 +171,27 @@ Note: The above mentioned options could be extracted after
configuring from the output of running "<maketool> help-options"
in the build directory. The related entries start with
CMAKE_ or DBUS_.
+
+
+How to compile in dbus into clients with cmake
+----------------------------------------------
+
+To compile dbus library into a client application with cmake
+the following cmake commands are required:
+
+1. call find_package to find dbus package
+
+find_package(DBus1)
+
+2. after specifing targets link dbus into target
+
+add_executable(test test.c)
+target_link_libraries(test ${DBus1_LIBRARIES})
+
+Adding ${DBus1_LIBRARIES} to targets also adds required dbus
+include dirs and compiler definitions by default. There is
+no need to add them with include_directories and add_definitions.
+
+To compile against dbus installed in a non standard location
+specify -DDBus1_DIR=<dbus-install-root>/lib[64]/cmake/DBus1
+on cmake command line.