Skip to content

Instantly share code, notes, and snippets.

@kubark42
Last active September 12, 2017 12:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kubark42/83059d08fc9fd8e003620bc967303473 to your computer and use it in GitHub Desktop.
Save kubark42/83059d08fc9fd8e003620bc967303473 to your computer and use it in GitHub Desktop.
Script for compiling QLocation from git sources.
# Clone main repo
git clone git://code.qt.io/qt/qt5.git
# Enter main repo
cd qt5
# Checkout 5.9, which is currently in Alpha [2017-02-15]
git checkout 5.9
# Fetch all submodules-- except webkit, webkit-examples, and webengine-- and check out v.5.9
perl init-repository --branch -module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
# Create an out-of-tree build directory
mkdir -p bin/debug
# Enter the directory
cd bin/debug/
# Configure a developer build, don't make examples or tests, and skip the license confirmation
../../configure -developer-build -opensource -nomake examples -nomake tests -confirm-license
# Compile Qt
make -j8
# Enter QLocation's directory
cd qtlocation/
# Run qmake on project file
../qtbase/bin/qmake ../../../qtlocation/qtlocation.pro
# Make QLocation
make -j8
## At this point, Qt and QLocation are built. Qt Creator can be configured to use Qt5.9 as a kit. Simply
## add a new Qt Version inside Qt Creator's preferences. By choosing bin/debug/qtbase/bin/qmake, Qt Creator
## will recognize that this is Qt5.9. Now create a new Kit and choose the 5.9 configuration in the Qt version
## drop-down box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment