Skip to content

Instantly share code, notes, and snippets.

@3nids
Created June 11, 2018 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3nids/60bc40b47e6e4db32cd20b81b58c9098 to your computer and use it in GitHub Desktop.
Save 3nids/60bc40b47e6e4db32cd20b81b58c9098 to your computer and use it in GitHub Desktop.
QGIS cmake
#!/usr/bin/env bash
export PATH=/usr/local/opt/qt/bin:/usr/local/opt/ccache/libexec:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
export CMAKE_PREFIX_PATH="/usr/local/opt/qt;/usr/local/opt/qt5-webkit;/usr/local/opt/qscintilla2;/usr/local/opt/qwt;/usr/local/opt/qwtpolar;/usr/local/opt/qca;/usr/local/opt/gdal2;/usr/local/opt/gsl;/usr/local/opt/geos;/usr/local/Cellar/proj/4.9.3/;/usr/local/opt/libspatialite;/usr/local/opt/spatialindex;/usr/local/opt/fcgi;/usr/local/opt/expat;/usr/local/opt/sqlite;/usr/local/opt/flex;/usr/local/opt/bison;/usr/local/opt/libzip;"
export QGIS_NINJA_BUILD=1
cmake -GNinja \
--Wno-dev \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
\
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \
-DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex \
-DQt5Sql_DIR=/usr/local/opt/qt/lib/cmake/Qt5Sql \
-DQt5Xml_DIR=/usr/local/opt/qt/lib/cmake/Qt5Xml \
-DQt5XmlPatterns_DIR=/usr/local/opt/qt/lib/cmake/Qt5XmlPatterns \
-DQt5UiTools_DIR=/usr/local/opt/qt/lib/cmake/Qt5UiTools \
-DQt5Test_DIR=/usr/local/opt/qt/lib/cmake/Qt5Test \
-DQt5WebKitWidgets_DIR=/usr/local/opt/qt5-webkit/lib/cmake/Qt5WebKitWidgets \
-DQt5WebKit_DIR=/usr/local/opt/qt5-webkit/lib/cmake/Qt5WebKit \
-DQCA_INCLUDE_DIR=/usr/local/opt/qca/lib/qca-qt5.framework/Headers \
-DQCA_LIBRARY=/usr/local/opt/qca/lib/qca-qt5.framework \
-DLIBTASN1_INCLUDE_DIR=/usr/local/include \
-DLIBTASN1_LIBRARY=/usr/local/lib/libtasn1.dylib \
-DQSCI_SIP_DIR=/usr/local/share/sip \
-DQTKEYCHAIN_INCLUDE_DIR=/usr/local/include/qt5keychain \
-DQTKEYCHAIN_LIBRARY=/usr/local/lib/libqt5keychain.dylib \
-DQSCINTILLA_LIBRARY=/usr/local/opt/qscintilla2/lib/libqscintilla2_qt5.dylib \
-DQSCINTILLA_INCLUDE_DIR=/usr/local/opt/qscintilla2/include \
-DPROJ_LIBRARY=/usr/local/Cellar/proj/5.0.1/lib/libproj.dylib \
-DPROJ_INCLUDE_DIR=/usr/local/Cellar/proj/5.0.1/include \
-DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
-DSPATIALITE_INCLUDE_DIR=/usr/local/opt/libspatialite/include \
-DSPATIALITE_LIBRARY=/usr/local/opt/libspatialite/lib/libspatialite.dylib \
-DSQLITE3_INCLUDE_DIR=/usr/local/opt/sqlite/include \
-DSQLITE3_LIBRARY=/usr/local/opt/sqlite/lib/libsqlite3.dylib \
\
-DWITH_BINDINGS=ON \
-DWITH_GRASS=FALSE \
../QGIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment