forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (31 loc) · 1.18 KB
/
install.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
#!/bin/sh
set -e
CONDA_PREFIX=/usr/local/miniconda/envs/test
# Few tricks from https://github.com/conda-forge/gdal-feedstock/blob/master/recipe/build.sh
# recommended in https://gitter.im/conda-forge/conda-forge.github.io?at=5c40da7f95e17b45256960ce
find ${CONDA_PREFIX}/lib -name '*.la' -delete
# build GDAL
mkdir build
cd build
# Disable Arrow/Parquet because the VM provides libraries in /usr/local/lib/
# that cause Illegal instruction error when running tests. I suspect the
# Arrow/Parquet libraries to be built with AVX2 support but the VM worker
# doesn't support it.
CFLAGS="-Wextra -Werror" CXXFLAGS="-Wextra -Werror" cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/install-gdal \
-DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \
-DCMAKE_BUILD_TYPE=Debug \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DGDAL_USE_PNG_INTERNAL=ON \
-DGDAL_USE_POSTGRESQL=OFF \
-DGDAL_USE_WEBP=OFF \
-DGDAL_USE_ARROW=OFF \
-DGDAL_USE_PARQUET=OFF \
-DBUILD_CSHARP_BINDINGS=OFF
make -j3
echo "Show which shared libs got used:"
otool -L apps/ogrinfo
make install
cd ..
# Post-install testing
# ../autotest/postinstall/test_pkg-config.sh $HOME/install-gdal