blob: aeed55347327237a51082edcfff1b8d998ac08f2 (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
Building
========
Prerequisites
-------------
* git
* GNU make
* cmake >= 2.8.12
* gcc >= 4.7 or clang >= 3.4 C compiller
* zlib-dev
Make
----
```sh
git clone https://github.com/Softmotions/ejdb.git
cd ejdb
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make
make install
# Or you can create tgz package:
make package
```
### CMake basic build(-D) options
```
// Build ejdb sample projects
BUILD_SAMPLES:BOOL=ON
// Build shared libraries
BUILD_SHARED_LIBS:BOOL=ON
// Build test cases
BUILD_TESTS:BOOL=OFF
// Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo.
CMAKE_BUILD_TYPE:STRING=Release
// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
// Enable PPA package build
ENABLE_PPA:BOOL=OFF
// Build .deb instalation packages
PACKAGE_DEB:BOOL=OFF
// Build .tgz package archive
PACKAGE_TGZ:BOOL=ON
// Upload debian packages to the launchpad ppa repository
UPLOAD_PPA:BOOL=OFF
```
### Building Windows libs
You need to checkout the [MXE cross build environment](http://mxe.cc)
Then create/edit MXE settings file:
```sh
cd <mxe checkout dir>
nano ./settings.mk
```
Save the following content in `settings.mk`:
```
JOBS := 1
MXE_TARGETS := x86_64-w64-mingw32.static i686-w64-mingw32.static
LOCAL_PKG_LIST := winpthreads pcre zlib lzo bzip2 cunit
.DEFAULT local-pkg-list:
local-pkg-list: $(LOCAL_PKG_LIST)
```
Build MXE packages:
```sh
cd <mxe checkout dir>
make
```
Build libejdb windows binaries:
```sh
export MXE_HOME=<mxe checkout dir>
cd <ejdb checkout dir>
mkdir build-win32
cd build-wind32
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../win64-tc.cmake ..
make package
```
EJDB binary package installation
===================================
Ubuntu
------
```sh
sudo add-apt-repository ppa:adamansky/ejdb
sudo apt-get update
sudo apt-get install ejdb ejdb-dbg
```
|