Convert an old Qt projet do CMake
Install base packages
pip install virtualenv
python -m virtualenv -p python3 convert
virtualenv -p python3 convert
.\convert\Scripts\activate.bat
qmake2cmake
Using the Qt tool qmake2cmake to convert the project to CMake
python -m pip install qmake2cmake
qmake2cmake_all . --min-qt-version 6.4
Build the project
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 ..
Notes for Windows build
Install the Qt6.4.0 version to build the project, and configure the CMake to use the Qt6.4.0 version.
- add bin qt to path “C:\Qt\6.4.0\msvc2019_64\bin”
- set CMAKE_PREFIX_PATH C:\Qt\6.4.0\msvc2019_64