Cpp:Improves dependency detection in CMakeLists.txt and update Readme. Patch contribu...
[platform/upstream/libphonenumber.git] / cpp / README
1 C++ version of the libphonenumber project.
2 Work in progress.
3
4 This is a port of the Java version.
5
6 This project uses some third-party code:
7   - src/base/ sources come from Chromium browser.
8   - src/utf/ sources come from lib9 which is also used in Go.
9
10 Requirements:
11   - CMake build system
12     http://www.cmake.org
13
14     You can install it very easily on a Debian-based GNU/Linux distribution:
15     $ sudo apt-get install cmake
16
17   - Protocol Buffers
18     http://code.google.com/p/protobuf/
19
20     You can install it very easily on a Debian-based GNU/Linux distribution:
21     $ sudo apt-get install libprotobuf-dev
22
23   - Google Test
24     http://code.google.com/p/googletest/
25
26     You can install it very easily on a Debian-based GNU/Linux distribution:
27     $ sudo apt-get install libgtest-dev
28
29   - RE2
30     http://code.google.com/p/re2/
31
32     You can install it very easily on Ubuntu Maverick and later:
33     $ sudo apt-get install libre2-dev
34
35     Otherwise if you use a Debian-based distribution you can fetch the Ubuntu
36     package which should work:
37     http://packages.ubuntu.com/maverick/libre2-dev
38
39     If you want to install it manually:
40     You need Mercurial to checkout its source code:
41     $ sudo apt-get install mercurial
42
43     Then checkout, build and install it:
44     $ hg clone https://re2.googlecode.com/hg re2
45     $ cd re2
46     $ make test
47     $ make install
48     $ make testinstall
49
50   - ICU
51     http://userguide.icu-project.org/
52
53     You can install it very easily on a Debian-based distribution:
54     $ sudo apt-get install libicu-dev
55
56
57 How to build libphonenumber C++:
58   $ cd libphonenumber
59   $ mkdir build
60   $ cd build
61   $ cmake ../cpp/
62   $ make