forked from hazelcast/hazelcast-cpp-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
releaseOSX.sh
executable file
·57 lines (45 loc) · 1.45 KB
/
releaseOSX.sh
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
set -e #abort the script at first faiure
echo "Cleanup release directories"
rm -rf ./Release*
rm -rf ./cpp
echo "Compiling Static Library"
mkdir ReleaseStatic
cd ReleaseStatic
cmake .. -DHZ_LIB_TYPE=STATIC -DHZ_BIT=64 -DCMAKE_BUILD_TYPE=Release
make -j
cd ..
echo "Compiling Shared Library"
mkdir ReleaseShared
cd ReleaseShared
cmake .. -DHZ_LIB_TYPE=SHARED -DHZ_BIT=64 -DCMAKE_BUILD_TYPE=Release
make -j
cd ..
#STANDART PART
mkdir -p ./cpp/Mac_64/hazelcast/include/hazelcast/
mkdir -p ./cpp/Mac_64/hazelcast/lib
mkdir -p ./cpp/Mac_64/external/include
mkdir -p ./cpp/Mac_64/examples/
echo "Moving headers to target"
cp -R hazelcast/include/hazelcast/ cpp/Mac_64/hazelcast/include/hazelcast/
echo "Moving libraries to target"
cp ReleaseStatic/libHazelcastClient*.a cpp/Mac_64/hazelcast/lib/
cp ReleaseShared/libHazelcastClient*.dylib cpp/Mac_64/hazelcast/lib/
echo "Moving dependencies to target"
cp -R external/include/ cpp/Mac_64/external/include/
echo "Moving examples to target"
cp examples/*cpp cpp/Mac_64/examples/
cp ReleaseStatic/examples/*exe cpp/Mac_64/examples/
#MAC SPECIFIC
cd cpp/Mac_64/hazelcast/lib/
export HAZELCAST_SHARED_LIB_NAME=$(echo *dylib)
install_name_tool -id ${HAZELCAST_SHARED_LIB_NAME} ${HAZELCAST_SHARED_LIB_NAME}
cd ../../../../
#ONLY IN DEVELOPMENT MACHINE
mkdir -p ./cpp/docs/
echo "Generating docs "
doxygen docsConfig
echo "Moving docs to target"
mv docs/ cpp
echo "Removing temporary files"
rm -rf ./ReleaseShared
rm -rf ./ReleaseStatic