summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 4ef692ba11ce29192407985de82938eb40ec2180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
= IPC CommonAPI D-Bus C++

:doctitle: IPC CommonAPI C++
:version:

== Copyright
Copyright (C) 2015, Bayerische Motoren Werke Aktiengesellschaft (BMW AG).
Copyright (C) 2015, GENIVI Alliance, Inc.

This file is part of GENIVI Project IPC Common API C++.
 
Contributions are licensed to the GENIVI Alliance under one or more Contribution License Agreements or MPL 2.0.

== License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

== Version
{version}

== CommonAPI D-Bus C++ User Guide
The user guide can be found in the documentation directory of the CommonAPI-D-Bus-Tools project.

== Further information
Source code and latest news can be found at http://projects.genivi.org/commonapi/.

== Build Instructions for Linux

=== Patching libdbus

CommonAPI-D-Bus needs some api functions of libdbus which are not available in actual libdbus versions. For these additional api functions it is necessary to patch the required libdbus version with the patches in the directory src/dbus-patches. Use autotools to build libdbus.

----
$ wget http://dbus.freedesktop.org/releases/dbus/dbus-<VERSION>.tar.gz
$ tar -xzf dbus-<VERSION>.tar.gz
$ cd dbus-<VERSION>
$ patch -p1 < </path/to/CommonAPI-D-Bus/src/dbus-patches/patch-names>.patch 
$ ./configure --prefix=/usr/local
$ make -C dbus 
$ sudo make -C dbus install
$ sudo make install-pkgconfigDATA
----

You can change the installation directory by the prefix option or you can let it uninstalled (skip the +make install+ commands).

=== Build CommonAPI-D-Bus Runtime

In order to build the CommonAPI-D-Bus Runtime library the pkgconfig files of the patched libdbus library must be added to the +PKG_CONFIG_PATH+.

For example, if the patched libdbus library is available in /usr/local, set the +PKG_CONFIG_PATH+ variable as follows:

----
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" 
----

Now use CMake to build the CommonAPI D-Bus runtime library. We assume that your source directory is +common-api-dbus-runtime+:

----
$ cd common-api-dbus-runtime
$ mkdir build
$ cd build
$ cmake -D USE_INSTALLED_COMMONAPI=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..
$ make
$ make install
----

You can change the installation directory by the CMake variable +CMAKE_INSTALL_PREFIX+ or you can let it uninstalled (skip the +make install+ command). If you want to use the uninstalled version of CommonAPI set the CMake variable USE_INSTALLED_COMMONAPI to OFF.

For further build instructions (build for windows, build documentation, tests etc.) please refer to the CommonAPI D-Bus tutorial.