Merge pull request #16794 from Chocobo1/qmake

Use qmake built-in variable to specify C++ version
This commit is contained in:
Chocobo1 2022-04-02 12:33:29 +08:00 committed by GitHub
commit 0b0338a9cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -34,11 +34,10 @@ jobs:
# use the preinstalled vcpkg from image # use the preinstalled vcpkg from image
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management
- name: Setup vcpkg - name: Setup vcpkg
uses: lukka/run-vcpkg@v7 uses: lukka/run-vcpkg@v10
with: with:
vcpkgDirectory: C:/vcpkg vcpkgDirectory: C:/vcpkg
doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
setupOnly: true
- name: Install dependencies from vcpkg - name: Install dependencies from vcpkg
run: | run: |

View file

@ -1,3 +1,5 @@
CONFIG += c++17
# After 1.55 some Windows users reported regular UI freezes. # After 1.55 some Windows users reported regular UI freezes.
# This makes ASIO use the pre-1.56 way of doing things. See issue #2003 # This makes ASIO use the pre-1.56 way of doing things. See issue #2003
DEFINES += BOOST_ASIO_DISABLE_CONNECTEX DEFINES += BOOST_ASIO_DISABLE_CONNECTEX
@ -32,15 +34,14 @@ win32-g++*|win32-clang-g++* {
DEFINES += _FILE_OFFSET_BITS=64 DEFINES += _FILE_OFFSET_BITS=64
DEFINES += __USE_W32_SOCKETS DEFINES += __USE_W32_SOCKETS
QMAKE_CXXFLAGS += -std=c++17
RC_FILE = qbittorrent_mingw.rc RC_FILE = qbittorrent_mingw.rc
LIBS += libadvapi32 libiphlpapi libole32 libpowrprof libshell32 libuser32 libwsock32 libws2_32 LIBS += libadvapi32 libiphlpapi libole32 libpowrprof libshell32 libuser32 libwsock32 libws2_32
} }
else:win32-msvc* { else:win32-msvc* {
CONFIG -= embed_manifest_exe CONFIG -= embed_manifest_exe
QMAKE_CXXFLAGS += /std:c++17 /utf-8
QMAKE_CXXFLAGS += /utf-8
QMAKE_LFLAGS += "/MANIFEST:EMBED /MANIFESTINPUT:$$quote($${PWD}/src/qbittorrent.exe.manifest) /STACK:0x800000" QMAKE_LFLAGS += "/MANIFEST:EMBED /MANIFESTINPUT:$$quote($${PWD}/src/qbittorrent.exe.manifest) /STACK:0x800000"
RC_FILE = qbittorrent.rc RC_FILE = qbittorrent.rc