Skip to content

Instantly share code, notes, and snippets.

@michaelkirk michaelkirk/build.sh
Last active Nov 29, 2015

Embed
What would you like to do?
How I build QGIS
#!/usr/bin/env bash
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SRC_ROOT="${BIN_DIR}/../.."
cd "${SRC_ROOT}"
cd build
make -j4 && make install
#!/usr/bin/env bash
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SRC_ROOT="${BIN_DIR}/../.."
cd "${SRC_ROOT}"
mkdir -p build
cd build
# QT5
# Didn't get qt5 to build, but here are some QT5 flags that were insufficient...
# -DWITH_BINDINGS=FALSE -DENABLE_QT5=TRUE
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/Users/mkirk/Applications \
-DCMAKE_PREFIX_PATH="/usr/local/opt/libxml2;/usr/local/opt/expat;/usr/local/opt/gettext;/usr/local/opt/sqlite;/usr/local" \
-DCMAKE_FRAMEWORK_PATH="/usr/local/opt/qwt/lib;/usr/local/opt/qwtpolar/lib" \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_CXX_FLAGS="-I/usr/local/opt/gettext/include" \
-DCMAKE_EXE_LINKER_FLAGS="-F/usr/local/Frameworks" \
-DCMAKE_MODULE_LINKER_FLAGS="-F/usr/local/Frameworks" \
-DCMAKE_SHARED_LINKER_FLAGS="-F/usr/local/Frameworks" \
-DCXX_EXTRA_FLAGS="-Wno-unused-private-field -Wno-deprecated-register" \
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \
-DQT_QMAKE_EXECUTABLE=/usr/local/bin/qmake \
-DGITCOMMAND=/usr/local/bin/git \
-DENABLE_TESTS=TRUE \
-DWITH_ASTYLE=TRUE \
-DWITH_PYSPATIALITE=FALSE \
-DWITH_INTERNAL_QWTPOLAR=FALSE \
-DWITH_SERVER=TRUE \
-DWITH_STAGED_PLUGINS=TRUE \
-DWITH_PY_COMPILE=TRUE \
-DWITH_APIDOC=FALSE \
-DWITH_QSCIAPI=FALSE \
-DQSCI_SIP_DIR=/usr/local/opt/qscintilla2/share/sip \
-DPOSTGRES_CONFIG=/usr/local/bin/pg_config \
-DWITH_GRASS=TRUE \
-DGRASS_PREFIX=/usr/local/opt/grass-64/grass-6.4.4 \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/local/opt/grass-70/grass-7.0.1 \
-DWITH_GLOBE=FALSE \
-DOSG_DIR=/usr/local \
-DOSGEARTH_DIR=/usr/local \
-DOSG_PLUGINS_PATH=/usr/local/lib/osgPlugins-3.4.0 \
-DWITH_ORACLE=FALSE \
-DQGIS_MACAPP_BUNDLE=0 \
-DPYTHON_EXECUTABLE=/usr/local/bin/python \
-DPYTHON_CUSTOM_FRAMEWORK=/usr/local/Frameworks/Python.framework/Versions/2.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.