aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
1 files changed, 8 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index 68118423..5cd45ac7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,37 +36,33 @@ matrix:
before_install:
- eval "${ENV_EVAL}"
-- if [ "$TRAVIS_OS_NAME" = "linux" ]; then USE_NINJA="-GNinja"; fi
+- export CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_PREFIX_PATH=../install -DCMAKE_INSTALL_PREFIX=../install"
+- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CMAKE_ARGS="$CMAKE_ARGS -GNinja"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then VALGRIND="valgrind $VALGRIND_OPTIONS"; fi
install:
- git clone https://gitlab.matrix.org/matrix-org/olm.git
- pushd olm
-- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=install
-- cmake --build build
+- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO $CMAKE_ARGS
- cmake --build build --target install
- popd
- git clone https://github.com/quotient-im/matrix-doc.git
- git clone --recursive https://github.com/KitsuneRal/gtad.git
- pushd gtad
-- cmake $USE_NINJA -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} .
+- cmake $CMAKE_ARGS .
- cmake --build .
- popd
before_script:
-- mkdir build && pushd build
-- cmake $USE_NINJA -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=../install -DOlm_DIR=../olm/install/lib/cmake/Olm ..
-- cmake --build . --target update-api
-- popd
+- cmake . -Bbuild -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" $CMAKE_ARGS
+- cmake --build build --target update-api
script:
- cmake --build build --target all
- cmake --build build --target install
# Build qmc-example with the installed library
-- mkdir build-example && pushd build-example
-- cmake -DCMAKE_PREFIX_PATH=../install -DOlm_DIR=../olm/install/lib/cmake/Olm ../examples
-- cmake --build . --target all
-- popd
+- cmake examples -Bbuild-example $CMAKE_ARGS
+- cmake --build build-example --target all
# Build with qmake
- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/lib" "LIBS += -Lolm/install/lib"
- make all