travis: Build Linux/Qt with CMake

This commit is contained in:
Florent Castelli
2016-10-13 03:26:18 +02:00
parent cb4d0732df
commit 38ccdd2c3b
3 changed files with 5 additions and 16 deletions
+4 -11
View File
@@ -6,7 +6,8 @@ while test $# -gt 0
do
case "$1" in
--qt) echo "Qt enabled"
CMAKE=0
QT=1
CMAKE_ARGS="-DUSING_QT_UI=ON ${CMAKE_ARGS}"
;;
--ios) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/ios.cmake ${CMAKE_ARGS}"
TARGET_OS=iOS
@@ -52,11 +53,7 @@ if [ ! -z "$TARGET_OS" ]; then
BUILD_DIR="$(tr [A-Z] [a-z] <<< build-"$TARGET_OS")"
else
echo "Building for native host."
if [ "$CMAKE" == "0" ]; then
BUILD_DIR="build-qt"
else
BUILD_DIR="build"
fi
BUILD_DIR="build"
fi
# Strict errors. Any non-zero return exits this script
@@ -65,11 +62,7 @@ set -e
mkdir -p ${BUILD_DIR}
pushd ${BUILD_DIR}
if [ "$CMAKE" == "1" ]; then
cmake $HEADLESS $CMAKE_ARGS .. | (grep -v "^-- " || true)
else
qmake $QMAKE_ARGS ../Qt/PPSSPPQt.pro
fi
cmake $CMAKE_ARGS .. | (grep -v "^-- " || true)
make -j4 $MAKE_OPT
popd