forked from Unidata/netcdf-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wjna
43 lines (31 loc) · 729 Bytes
/
wjna
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
#!/bin/bash
REBUILD=1
#VS=12
VS=10
JNADIR="c:/opt/jna"
PREFIX="${JNADIR}"
CPP="${JNADIR}/deps/shared"
FLAGS=""
FLAGS="-DCMAKE_INSTALL_PREFIX=${PREFIX} ${FLAGS}"
FLAGS="-DCMAKE_PREFIX_PATH=${CPP} ${FLAGS}"
FLAGS="-DHDF5_DIR=${CPP}/cmake/hdf5 ${FLAGS}"
FLAGS="-DENABLE_CONVERSION_WARNINGS=OFF ${FLAGS}"
FLAGS="-DBUILD_UTILITIES=OFF ${FLAGS}"
FLAGS="-DENABLE_EXAMPLES=OFF ${FLAGS}"
FLAGS="-DENABLE_V2_API=OFF ${FLAGS}"
FLAGS="-DENABLE_JNA=ON ${FLAGS}"
if test "x${REBUILD}" = x1 ; then
rm -fr ./build
mkdir build
fi
pushd build
if test "x${REBUILD}" = x1 ; then
cmake -G"Visual Studio ${VS}" ${FLAGS} ..
fi
cmake --build . --config Release
cmake --build . --target INSTALL
popd
pushd ${PREFIX}
sh ../setup
popd
exit