From 5e42f2ad26d35950405480f3eea2ed73fdfba841 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 5 Sep 2021 02:04:27 +0300 Subject: [PATCH] build: Make default name Qt and VS versions agnostic This change allows users to not patch `common.qt.init.vcxproj` to fit their Qt and Visual Studio versions. Also it simplifies code base maintaining. To specify a non-default path, the QTBASEDIR environment variable can be used. --- .cirrus.yml | 2 +- build_msvc/README.md | 2 +- build_msvc/common.qt.init.vcxproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 5105e0a4900..510a9cc172a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -92,7 +92,7 @@ task: QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.12/5.12.11/single/qt-everywhere-src-5.12.11.zip' QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.12.11.zip' QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.12.11' - QTBASEDIR: 'C:\Qt5.12.11_x64_static_vs2019_160900' + QTBASEDIR: 'C:\Qt_static' x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"' IgnoreWarnIntDirInTempDetected: 'true' merge_script: diff --git a/build_msvc/README.md b/build_msvc/README.md index c3705f6b037..7aad033befd 100644 --- a/build_msvc/README.md +++ b/build_msvc/README.md @@ -55,7 +55,7 @@ The instructions below use `vcpkg` to install the dependencies. PS >py -3 msvc-autogen.py ``` -- An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. +- An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. To specify a non-default path to a static Qt package directory, use the `QTBASEDIR` environment variable. - To build from the command line with the Visual Studio 2019 toolchain use: diff --git a/build_msvc/common.qt.init.vcxproj b/build_msvc/common.qt.init.vcxproj index df2fd2fb49e..cc8063e545b 100644 --- a/build_msvc/common.qt.init.vcxproj +++ b/build_msvc/common.qt.init.vcxproj @@ -2,7 +2,7 @@ - C:\Qt5.12.11_x64_static_vs2019_160900 + C:\Qt_static $(QtBaseDir)\plugins $(QtBaseDir)\lib $(QtBaseDir)\include