Build scripts: work with both Qt 5.5 and 5.6

This is all a bit hackish but seems to work

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-03-03 14:32:23 -08:00
parent 01ae4af13d
commit 2b1812f2cb
3 changed files with 19 additions and 3 deletions

View file

@ -23,7 +23,7 @@ Step 1.
Extract and install these into known directories. Extract and install these into known directories.
Have a look in the top of build.sh for where the cross build tool expects Have a look in the top of build.sh for where the cross build tool expects
them. By default thats is: ../../../android-ndk-r9d ../../../android-sdk-linux them. By default thats is: ../../../android-ndk-r9d ../../../android-sdk-linux
and ../../../Qt/5.5 and ../../../Qt/5.5 (or Qt/5.6)
Step 2. Step 2.
Run bash build.sh in the terminal. By default it builds for arm but you Run bash build.sh in the terminal. By default it builds for arm but you

View file

@ -20,7 +20,16 @@ fi
# Configure where we can find things here # Configure where we can find things here
export ANDROID_NDK_ROOT=$SUBSURFACE_SOURCE/../android-ndk-r10e export ANDROID_NDK_ROOT=$SUBSURFACE_SOURCE/../android-ndk-r10e
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.5
if [ -d "$SUBSURFACE_SOURCE/../Qt/5.5" ] ; then
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.5
elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.6" ] ; then
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.6
else
echo "Cannot find Qt 5.5 or 5.6 under $SUBSURFACE_SOURCE/../Qt"
exit 1
fi
if [ $PLATFORM = Darwin ] ; then if [ $PLATFORM = Darwin ] ; then
export ANDROID_SDK_ROOT=$SUBSURFACE_SOURCE/../android-sdk-macosx export ANDROID_SDK_ROOT=$SUBSURFACE_SOURCE/../android-sdk-macosx
export ANDROID_NDK_HOST=darwin-x86_64 export ANDROID_NDK_HOST=darwin-x86_64

View file

@ -140,7 +140,14 @@ fi
mkdir -p build mkdir -p build
cd build cd build
if [ $PLATFORM = Darwin ] ; then if [ $PLATFORM = Darwin ] ; then
export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake if [ -d "~/Qt/5.5" ] ; then
export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake
elif [ -d "~/Qt/5.6" ] ; then
export CMAKE_PREFIX_PATH=~/Qt/5.6/clang_64/lib/cmake
else
echo "cannot find Qt 5.5 or 5.6 in ~/Qt"
exit 1
fi
fi fi
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \ cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \ -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \