2014-03-30 03:35:52 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-04-16 11:25:44 +08:00
|
|
|
REBUILD=1
|
2014-04-11 04:03:11 +08:00
|
|
|
|
2014-06-14 03:41:11 +08:00
|
|
|
#VS=12
|
|
|
|
VS=10
|
2014-04-11 04:03:11 +08:00
|
|
|
|
2014-04-04 05:46:12 +08:00
|
|
|
JNADIR="c:/opt/jna"
|
2014-03-30 03:35:52 +08:00
|
|
|
|
|
|
|
PREFIX="${JNADIR}"
|
|
|
|
|
2014-04-04 05:46:12 +08:00
|
|
|
CPP="${JNADIR}/deps/shared"
|
2014-03-30 03:35:52 +08:00
|
|
|
|
|
|
|
FLAGS=""
|
|
|
|
|
|
|
|
FLAGS="-DCMAKE_INSTALL_PREFIX=${PREFIX} ${FLAGS}"
|
2014-04-04 05:46:12 +08:00
|
|
|
FLAGS="-DCMAKE_PREFIX_PATH=${CPP} ${FLAGS}"
|
2014-03-30 03:35:52 +08:00
|
|
|
|
2014-04-04 05:46:12 +08:00
|
|
|
FLAGS="-DHDF5_DIR=${CPP}/cmake/hdf5 ${FLAGS}"
|
2014-03-30 03:35:52 +08:00
|
|
|
|
2014-04-04 05:46:12 +08:00
|
|
|
FLAGS="-DENABLE_CONVERSION_WARNINGS=OFF ${FLAGS}"
|
2014-03-30 03:35:52 +08:00
|
|
|
FLAGS="-DBUILD_UTILITIES=OFF ${FLAGS}"
|
|
|
|
FLAGS="-DENABLE_EXAMPLES=OFF ${FLAGS}"
|
2014-04-10 09:55:20 +08:00
|
|
|
FLAGS="-DENABLE_V2_API=OFF ${FLAGS}"
|
|
|
|
FLAGS="-DENABLE_JNA=ON ${FLAGS}"
|
2014-03-30 03:35:52 +08:00
|
|
|
|
2014-04-11 04:03:11 +08:00
|
|
|
if test "x${REBUILD}" = x1 ; then
|
|
|
|
rm -fr ./build
|
|
|
|
mkdir build
|
|
|
|
fi
|
2014-03-30 03:35:52 +08:00
|
|
|
pushd build
|
2014-04-11 04:03:11 +08:00
|
|
|
if test "x${REBUILD}" = x1 ; then
|
|
|
|
cmake -G"Visual Studio ${VS}" ${FLAGS} ..
|
|
|
|
fi
|
2014-03-30 03:35:52 +08:00
|
|
|
cmake --build . --config Release
|
2014-04-04 05:46:12 +08:00
|
|
|
cmake --build . --target INSTALL
|
2014-03-30 03:35:52 +08:00
|
|
|
popd
|
|
|
|
|
2014-04-11 04:03:11 +08:00
|
|
|
pushd ${PREFIX}
|
|
|
|
sh ../setup
|
|
|
|
popd
|
|
|
|
|
2014-03-30 03:35:52 +08:00
|
|
|
exit
|