-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathINSTALL.cmake
More file actions
68 lines (47 loc) · 1.71 KB
/
Copy pathINSTALL.cmake
File metadata and controls
68 lines (47 loc) · 1.71 KB
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
*NOTE* The ZMQ cmake build is still a work in progress
*TODO* perf build not complete yet
*TODO* pyzmq build not complete yet
*TODO* jzmq build not complete yet
*TODO* issue with camera example, glib appears to be a dependency
*TODO* figure out the best way to update/change compile flags
*TODO* documentation
When using cmake, make sure the compiler is in your path or set the
CC and CXX environment variables before you build.
For example, on AIX,
CC=/usr/vac/bin/xlc_r; export CC
CXX=/usr/vac/bin/xlC_r; export CXX
To build a debug version on unix,
mkdir /tmp/zmq-debug-build; cd /tmp/zmq-debug-build
cmake -D"CMAKE_INSTALL_PREFIX=${HOME}/zmq" /path/to/source
make; make install
To build a release version on unix,
mkdir /tmp/zmq-release-build; cd /tmp/zmq-release-build
cmake \
-D"CMAKE_INSTALL_PREFIX=${HOME}/zmq" \
-D"CMAKE_BUILD_TYPE=Release" \
/path/to/source
make; make install
To build a debug version on Windows using nmake,
mkdir c:\temp\zmq-debug-build
cd c:\temp\zmq-debug-build
cmake \
-G"NMake Makefiles" \
-D"CMAKE_BUILD_TYPE=Debug" \
-D"CMAKE_INSTALL_PREFIX=%userprofile%\Desktop\zmq" \
c:\path\to\source
nmake & nmake install
To build a release version on Windows using nmake,
mkdir c:\temp\zmq-debug-build
cd c:\temp\zmq-debug-build
cmake \
-G"NMake Makefiles" \
-D"CMAKE_BUILD_TYPE=Release" \
-D"CMAKE_INSTALL_PREFIX=%userprofile%\Desktop\zmq" \
c:\path\to\source
nmake & nmake install
To build the C, Java and Python addons,
-D"WITH_C=ON" -D"WITH_JAVA=ON" -D"WITH_PYTHON=ON"
To build the examples,
-D"WITH_CHAT=ON" -D"WITH_EXCHANGE=ON" -D"WITH_CAMERA=ON"
To build shared libraries,
-D"BUILD_SHARED_LIBS=ON"