Merge "Optional autogen.sh flag --enable-kdbus-transport added allowing to compile...
[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 see http://sourceforge.net/projects/expat/ 
7     unsupported RelWithDebInfo builds could be fetched 
8     from http://sourceforge.net/projects/kde-windows/files/expat/
9
10 Building
11 --------
12
13 Win32 MinGW-w64|32
14 1. install mingw-w64 from http://sourceforge.net/projects/mingw-w64/
15 2. install cmake and libexpat
16 3. get dbus sources
17 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
18 5. mkdir dbus-build
19 6. cd dbus-build
20 7. run 
21     cmake -G "MinGW Makefiles" [<options, see below>] <dbus-src-root>/cmake
22     mingw32-make
23     mingw32-make install
24
25 Win32 Microsoft nmake
26 1. install MSVC 2010 Express Version from http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
27 2. install cmake and libexpat
28 3. get dbus sources
29 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
30 5. mkdir dbus-build
31 6. cd dbus-build
32 7. run 
33     cmake -G "NMake Makefiles" [<options, see below>] <dbus-src-root>/cmake
34     nmake
35     nmake install
36
37 Win32 Visual Studio 2010 Express IDE
38 1. install MSVC 2010 Express Version from http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
39 2. install cmake and libexpat
40 3. get dbus sources
41 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
42 5. mkdir dbus-build
43 6. cd dbus-build
44 7. run
45       cmake -G "Visual Studio 10" [<options, see below>] <dbus-src-root>/cmake
46 8a. open IDE with
47       vcexpress dbus.sln
48 8b. for immediate build run
49       vcexpress dbus.sln /build
50
51 Win32 Visual Studio 2010 Professional IDE
52 1. install MSVC 2010 Professional Version
53 2. install cmake and libexpat
54 3. get dbus sources
55 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
56 5. mkdir dbus-build
57 6. cd dbus-build
58 7. run 
59       cmake -G "Visual Studio 10" [<options, see below>] <dbus-src-root>/cmake
60 8a. open IDE with
61       devenv dbus.sln
62 8b. for immediate build run
63       devenv dbus.sln /build
64
65 Linux
66 1. install cmake and libexpat
67 2. get dbus sources
68 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
69 4. mkdir dbus-build
70 5. cd dbus-build
71 6. run 
72     cmake -G "<for available targets, see cmake --help for a list>" [<options, see below>] <dbus-src-root>/cmake
73     make
74     make install
75
76 For other compilers see cmake --help in the Generators section
77
78 Configuration flags
79 -------------------
80
81 When using the cmake build system the dbus-specific configuration flags that can be given 
82 to the cmake program are these (use -D<key>=<value> on command line). The listed values 
83 are the defaults (in a typical build - some are platform-specific).
84
85 // Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
86 // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
87 CMAKE_BUILD_TYPE:STRING=Debug
88
89 // Include path for 3rdparty packages
90 CMAKE_INCLUDE_PATH:PATH=
91
92 // Library path for 3rdparty packages
93 CMAKE_LIBRARY_PATH:PATH=
94
95 // Install path prefix, prepended onto install directories.
96 CMAKE_INSTALL_PREFIX:PATH=C:/Program Files/dbus
97
98
99 // enable unit test code
100 DBUS_BUILD_TESTS:BOOL=ON
101
102 // The name of the dbus daemon executable
103 DBUS_DAEMON_NAME:STRING=dbus-daemon
104
105 // Disable assertion checking
106 DBUS_DISABLE_ASSERT:BOOL=OFF
107
108 // Disable public API sanity checking
109 DBUS_DISABLE_CHECKS:BOOL=OFF
110
111 // enable -ansi -pedantic gcc flags
112 DBUS_ENABLE_ANSI:BOOL=OFF
113
114 // build DOXYGEN documentation (requires Doxygen)
115 DBUS_ENABLE_DOXYGEN_DOCS:BOOL=OFF
116
117 // enable bus daemon usage statistics
118 DBUS_ENABLE_STATS:BOOL=OFF
119
120 // support verbose debug mode
121 DBUS_ENABLE_VERBOSE_MODE:BOOL=ON
122
123 // build XML  documentation (requires xmlto or meinproc4)
124 DBUS_ENABLE_XML_DOCS:BOOL=ON
125
126 // Some atomic integer implementation present
127 DBUS_HAVE_ATOMIC_INT:BOOL=OFF
128
129 // install required system libraries
130 DBUS_INSTALL_SYSTEM_LIBS:BOOL=OFF
131
132 // session bus default listening address
133 DBUS_SESSION_BUS_LISTEN_ADDRESS:STRING=autolaunch:
134
135 // session bus fallback address for clients
136 DBUS_SESSION_BUS_CONNECT_ADDRESS:STRING=autolaunch:
137
138 // system bus default address (only useful on Unix)
139 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS:STRING=unix:path=/var/run/dbus/system_bus_socket
140
141 // Use atomic integer implementation for 486
142 DBUS_USE_ATOMIC_INT_486:BOOL=OFF
143
144 win32 only:
145 // enable win32 debug port for message output
146 DBUS_USE_OUTPUT_DEBUG_STRING:BOOL=OFF
147
148 gcc only:
149 // compile with coverage profiling instrumentation
150 DBUS_GCOV_ENABLED:BOOL=OFF
151
152 solaris only:
153 // enable console owner file 
154 HAVE_CONSOLE_OWNER_FILE:BOOL=ON
155
156 // Directory to check for console ownership
157 DBUS_CONSOLE_OWNER_FILE:STRING=/dev/console
158
159 x11 only:
160 // Build with X11 auto launch support
161 DBUS_BUILD_X11:BOOL=ON
162
163
164 Note: The above mentioned options could be extracted after 
165 configuring from the output of running "<maketool> help-options" 
166 in the build directory. The related entries start with 
167 CMAKE_ or DBUS_.