Collected cmake doc into README.cmake.
[platform/upstream/dbus.git] / README.cmake
1 This file describes how to compile dbus using the cmake build system
2
3 Requirements
4 ------------
5 - cmake version >= 2.4.4 see http://www.cmake.org
6 - installed libexpat
7
8 Building
9 --------
10
11 Win32 MinGW
12 1. install cmake and libexpat 
13 2. get dbus sources
14 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
15 4. mkdir dbus-build
16 5. cd dbus-build
17 6. run 
18         cmake -G "MinGW Makefiles" [<options, see below>] <dbus-src-root>/cmake
19     mingw32-make
20     mingw32-make install
21         
22 Win32 Microsoft nmake 
23 1. install cmake and libexpat 
24 2. get dbus sources
25 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
26 4. mkdir dbus-build
27 5. cd dbus-build
28 6. run 
29         cmake -G "NMake Makefiles" [<options, see below>] <dbus-src-root>/cmake
30     nmake
31     nmake install
32         
33 Win32 Visual Studio IDE
34 1. install cmake and libexpat 
35 2. get dbus sources
36 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
37 4. mkdir dbus-build
38 5. cd dbus-build
39 6. run 
40         cmake -G "Visual Studio 10" [<options, see below>] <dbus-src-root>/cmake
41     start 
42     nmake install
43
44 Linux
45 1. install cmake and libexpat 
46 2. get dbus sources
47 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
48 4. mkdir dbus-build
49 5. cd dbus-build
50 6. run 
51         cmake -G "<for available targets, see cmake --help for a list>" [<options, see below>] <dbus-src-root>/cmake
52     make
53     make install
54
55 For other compilers see cmake --help in the Generators section
56         
57 Configuration flags
58 -------------------
59         
60 When using the cmake build system the dbus-specific configuration flags that can be given 
61 to the cmake program are these (use -D<key>=<value> on command line). The listed values 
62 are the defaults. 
63
64 // Choose the type of build, options are: None(CMAKE_CXX_FLAGS or 
65 // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
66 CMAKE_BUILD_TYPE:STRING=Debug
67
68 // Include path for 3rdparty packages
69 CMAKE_INCLUDE_PATH:PATH=
70
71 // Library path for 3rdparty packages
72 CMAKE_LIBRARY_PATH:PATH=
73
74 // Install path prefix, prepended onto install directories.
75 CMAKE_INSTALL_PREFIX:PATH=C:/Program Files/dbus
76
77
78 // enable unit test code
79 DBUS_BUILD_TESTS:BOOL=ON
80
81 // The name of the dbus daemon executable
82 DBUS_DAEMON_NAME:STRING=dbus-daemon
83
84 // Disable assertion checking
85 DBUS_DISABLE_ASSERTS:BOOL=OFF
86
87 // Disable public API sanity checking
88 DBUS_DISABLE_CHECKS:BOOL=OFF
89
90 // enable -ansi -pedantic gcc flags
91 DBUS_ENABLE_ANSI:BOOL=OFF
92
93 // build DOXYGEN documentation (requires Doxygen)
94 DBUS_ENABLE_DOXYGEN_DOCS:BOOL=OFF
95
96 // enable bus daemon usage statistics
97 DBUS_ENABLE_STATS:BOOL=OFF
98
99 // support verbose debug mode
100 DBUS_ENABLE_VERBOSE_MODE:BOOL=ON
101
102 // build XML  documentation (requires xmlto or meinproc4)
103 DBUS_ENABLE_XML_DOCS:BOOL=ON
104
105 // Some atomic integer implementation present
106 DBUS_HAVE_ATOMIC_INT:BOOL=OFF
107
108 // install required system libraries
109 DBUS_INSTALL_SYSTEM_LIBS:BOOL=OFF
110
111 // session bus default address
112 DBUS_SESSION_BUS_DEFAULT_ADDRESS:STRING=nonce-tcp:
113
114 // system bus default address
115 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS:STRING=nonce-tcp:
116
117 // Use atomic integer implementation for 486
118 DBUS_USE_ATOMIC_INT_486:BOOL=OFF
119
120 // Use expat (== ON) or libxml2 (==OFF)
121 DBUS_USE_EXPAT:BOOL=ON
122
123 win32 only:
124 // enable win32 debug port for message output
125 DBUS_USE_OUTPUT_DEBUG_STRING:BOOL=OFF
126
127 gcc only:
128 // compile with coverage profiling instrumentation
129 DBUS_GCOV_ENABLED:BOOL=OFF
130
131 linux only:
132 // build with dnotify support 
133 DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX:BOOL=ON
134
135 solaris only:
136 // enable console owner file 
137 HAVE_CONSOLE_OWNER_FILE:BOOL=ON
138
139 // Directory to check for console ownership
140 DBUS_CONSOLE_OWNER_FILE:STRING=/dev/console
141
142 x11 only:
143 // Build with X11 auto launch support
144 DBUS_BUILD_X11:BOOL=ON
145
146
147 Note: The above mentioned options could be extracted after 
148 configuring from the output of running "<maketool> help-options" 
149 in the build directory. The related entries start with 
150 CMAKE_ or DBUS_.