netcdf-c/wjna

44 lines
750 B
Plaintext
Raw Normal View History

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
JNADIR="c:/opt/jna"
2014-03-30 03:35:52 +08:00
PREFIX="${JNADIR}"
CPP="${JNADIR}/deps/shared"
2014-03-30 03:35:52 +08:00
FLAGS=""
FLAGS="-DCMAKE_INSTALL_PREFIX=${PREFIX} ${FLAGS}"
FLAGS="-DCMAKE_PREFIX_PATH=${CPP} ${FLAGS}"
2014-03-30 03:35:52 +08:00
FLAGS="-DHDF5_DIR=${CPP}/cmake/hdf5 ${FLAGS}"
2014-03-30 03:35:52 +08:00
FLAGS="-DNETCDF_ENABLE_CONVERSION_WARNINGS=OFF ${FLAGS}"
2024-03-19 04:29:24 +08:00
FLAGS="-DNETCDF_BUILD_UTILITIES=OFF ${FLAGS}"
FLAGS="-DNETCDF_ENABLE_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
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