blob: cb03c8b603c1ae030f7cbbf8836676a2ae60b6d5 (
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
|
#!/bin/sh
set -e
OS=$(uname -s)
case $OS in
Linux)
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
make VERBOSE=1 test
sudo make VERBOSE=1 install
cd ..
;;
Darwin)
# forcing brew versions (of gettext) over Mac versions
export CFLAGS=-I/usr/local
export CXXFLAGS=-I/usr/local
export LDFLAGS=-L/usr/local/lib
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -G Xcode ..
xcodebuild -configuration Release -target ALL_BUILD
xcodebuild -configuration Release -target RUN_TESTS
sudo xcodebuild -configuration Release -target install
cd ..
;;
*)
echo "ERROR: unknown operating system '$OS'."
;;
esac
|