forked from zeromq/cppzmq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·47 lines (37 loc) · 967 Bytes
/
build.sh
File metadata and controls
executable file
·47 lines (37 loc) · 967 Bytes
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
#!/usr/bin/env bash
set -x
set -e
# install libzmq from pre-build binary package
install_zeromq_apt(){
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/network:messaging:zeromq:release-stable.list"
sudo apt-get update
sudo apt-get install libzmq3-dev
}
# install libzmq from source
install_zeromq_source() {
pushd .
mkdir libzmq
cd libzmq
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
tar -xvzf zeromq.tar.gz
cd libzmq-${ZMQ_VERSION}
mkdir build
cd build
cmake -DZMQ_BUILD_TESTS=OFF ..
sudo make -j4 install
popd
}
# build cppzmq from source
install_cppzmq_source() {
pushd .
mkdir -p build
cd build
cmake -DCPPZMQ_BUILD_TESTS=OFF ..
sudo make -j4 install
popd
}
if [ "${ZMQ_VERSION}" == "" ] ; then
export ZMQ_VERSION=4.2.5
fi
install_zeromq_source
install_cppzmq_source