Skip to content

Commit

Permalink
Fix qmake builds in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsuneRal committed Jul 7, 2019
1 parent 4e521ae commit d5b4e64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
14 changes: 4 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@ environment:
QTDIR: C:\Qt\5.9\msvc2017_64
VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
PLATFORM:
MAKETOOL: cmake
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
QTDIR: C:\Qt\5.9\msvc2017_64
VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
PLATFORM:
MAKETOOL: qmake
- QTDIR: C:\Qt\5.9\msvc2015
VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
PLATFORM: x86
MAKETOOL: cmake

init:
- call "%QTDIR%\bin\qtenv2.bat"
Expand All @@ -29,11 +22,12 @@ before_build:
- cd 3rdparty/libQtOlm
- git clone https://gitlab.matrix.org/matrix-org/olm.git
- cd ../..
- if %MAKETOOL% == cmake cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%"
- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%"

build_script:
- if %MAKETOOL% == cmake cmake --build build
- if %MAKETOOL% == qmake qmake && jom
- cmake --build build
# qmake uses olm just built by CMake - it can't build olm on its own.
- qmake "INCLUDEPATH += 3rdparty/libQtOlm/olm/include" "LIBS += -Lbuild" && jom

#after_build:
#- cmake --build build --target install
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ script:
- cmake -DCMAKE_PREFIX_PATH=../install ../examples
- cmake --build . --target all
- popd
# Build and install with qmake
- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX"
# Build with qmake
- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += 3rdparty/libQtOlm/olm/include" "LIBS += -Lbuild/lib"
- make all
# Run the qmake-compiled qmc-example under valgrind
- if [ "$QMC_TEST_USER" != "" ]; then $VALGRIND ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" qmc-example-travis '#qmc-test:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi
Expand Down
2 changes: 2 additions & 0 deletions libqmatrixclient.pri
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ win32-msvc* {
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}

include(3rdparty/libQtOlm/libQtOlm.pri)

SRCPATH = $$PWD/lib
INCLUDEPATH += $$SRCPATH

Expand Down

0 comments on commit d5b4e64

Please sign in to comment.