Init
This commit is contained in:
24
07-Other/Qt/Qt6编译步骤.md
Normal file
24
07-Other/Qt/Qt6编译步骤.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# 前言
|
||||
参考:
|
||||
- https://doc.qt.io/qt-6/windows-building.html
|
||||
- 构建选项:https://doc.qt.io/qt-6/configure-options.html
|
||||
- https://www.cnblogs.com/eslzzyl/p/17270948.html
|
||||
|
||||
# 编译步骤
|
||||
1. 安装Ninja、Perl、Python、CMake并且设置环境变量。
|
||||
2. 在指定目录下创建`Src`、`Build`、`Install`文件夹内。
|
||||
3. 将源码下载包解压至`Src`中。
|
||||
4. 进入`Build`文件夹,并且输入`..\Src\qtbase\configure -prefix ..\Install -debug-and-release`
|
||||
5. 编译`cmake --build . --parallel`
|
||||
6. `cmake --install .`
|
||||
|
||||
之后安装QtCreator进行编译。
|
||||
|
||||
PS.感觉不太行,最后还是通过网络安装的方式进行安装。
|
||||
|
||||
# Qt6 CMake
|
||||
https://www.jetbrains.com/help/clion/qt-tutorial.html#cmake-qt
|
||||
|
||||
1. 使用QtCreator创建项目之后,使用CMake打开CMakeLists.txt。
|
||||
2. 设置`CMAKE_PREFIX_PATH`为`6.5.2\msvc2019_64\lib\cmake`,例如:`C:\Qt\6.5.2\msvc2019_64\lib\cmake`
|
||||
3. 之后依次点Configuration与Generate。
|
Reference in New Issue
Block a user