当前位置: 首页 > 工具软件 > neovim-qt > 使用案例 >

如何脱离QT 的IDE 自行创建

湛宝
2023-12-01

Running D:\sdk\Qt\Tools\CMake_64\bin\cmake.exe -S D:/Users/hongs/Desktop/workspace/QtProjects/untitled -B D:/Users/hongs/Desktop/workspace/QtProjects/build-untitled-Desktop_Qt_6_2_4_MinGW_64_bit-Debug “-DCMAKE_GENERATOR:STRING=Ninja” “-DCMAKE_BUILD_TYPE:STRING=Debug” “-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=D:\Users\hongs\Desktop\workspace\QtProjects\build-untitled-Desktop_Qt_6_2_4_MinGW_64_bit-Debug/.qtc/package-manager/auto-setup.cmake” “-DQT_QMAKE_EXECUTABLE:FILEPATH=D:/sdk/Qt/6.2.4/mingw_64/bin/qmake.exe” “-DCMAKE_PREFIX_PATH:PATH=D:/sdk/Qt/6.2.4/mingw_64” “-DCMAKE_C_COMPILER:FILEPATH=D:/sdk/Qt/Tools/mingw1120_64/bin/gcc.exe” “-DCMAKE_CXX_COMPILER:FILEPATH=D:/sdk/Qt/Tools/mingw1120_64/bin/g++.exe” “-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG” in D:\Users\hongs\Desktop\workspace\QtProjects\build-untitled-Desktop_Qt_6_2_4_MinGW_64_bit-Debug.

主要是 auto-setup.cmake 必须包含,也就是将 qtc 拷贝出来
写一个 powershell的脚本
我的诉求是,cmake 创建
我可以在 windows 使用 neovim 无忧无虑的编码了

qtc_init.ps1

cmake -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=D:/sdk/Qt/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=D:/sdk/Qt/6.2.4/mingw_64/bin/qmake.exe -DCMAKE_PREFIX_PATH:PATH=D:/sdk/Qt -DCMAKE_C_COMPILER:FILEPATH=D:/sdk/Qt/Tools/mingw1120_64/bin/gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:/sdk/Qt/Tools/mingw1120_64/bin/g++.exe -DCMAKE_INSTALL_PREFIX=D:/sdk/Qt/Tools/mingw1120_64/x86_64-w64-mingw32 -DEVENT__DISABLE_MBEDTLS=ON     .. -G "Ninja"
 类似资料: