From 11a90d9b4f741bff37f1517e3188e8820586d6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= Date: Tue, 14 Jul 2020 11:40:16 +0200 Subject: [PATCH] Try building the Windows version in GA (win) --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ CMakeLists.txt | 3 +++ src/CMakeLists.txt | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe1c7c8246..a80e7aa0c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,33 @@ on: types: [ created ] jobs: + windows-qt: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Install Qt + uses: jurplel/install-qt-action@v2 + with: + modules: qtwebengine + - name: Install dependencies + shell: bash + run: | + choco install openssl + - name: Build the application + shell: bash + run: | + mkdir build + cd build + export CMAKE_PREFIX_PATH="$Qt5_Dir/lib/cmake" + export PATH="$Qt5_Dir/bin":"$PATH" + kit=$(ls "/c/Program Files (x86)/Windows Kits/10/bin/"*"/x64/mc.exe" | head -n1 | sed s/mc.exe//) + export PATH="$kit":"$PATH" + export OPENSSL_ROOT_DIR="/c/Program Files/OpenSSL-Win64" + cmake -DCMAKE_BUILD_TYPE=Release -DTOGGL_BUILD_TESTS=OFF -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" .. + cmake --build . --config Release -- -m + macos-qt: runs-on: macOS-latest steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index 06d2e808c1..ceb0e76174 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,9 @@ option(INSTALL_HIRES_ICONS "Do not install icons over 512x512" OFF) option(TOGGL_BUILD_TESTS "Build the Toggl test suite" ON) set(ENV{OPENSSL_ROOT_DIR} ${OPENSSL_ROOT_DIR}) +if (NOT "${OPENSSL_ROOT_DIR}" STREQUAL "") + include_directories("${OPENSSL_ROOT_DIR}/include") +endif() set(ENV{OPENSSL_ROOT_DIR} ${OPENSSL_ROOT_DIR}) if (NOT "${OPENSSL_ROOT_DIR}" STREQUAL "") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1d85f12450..1d82304917 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,7 @@ include_directories( ${LUA_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS} - $ENV{OPENSSL_ROOT_DIR}/include + "$ENV{OPENSSL_ROOT_DIR}/include" ) # TogglDesktopLibrary sources