qt creator can't add cmake tools from qt6 cross build
-
I cross compiled qt6 for NXP i.mx6 device, and install it to my host pc.
I can manually build qt6 project use ./bin/qt-cmake command line. but I can't itegrate it to qt creatorManual add my build qt-cmake to qt creator cmake tools via
Edit -> Preference -> CMake -> Tools
failed, I monitor that qt creator detect cmake tools by run cmake -E capabilitiesthe cmake on my host pc run ok
$ cmake -E capabilities
{"fileApi":{"requests":[{"kind":"codemodel","version":[{"major":2,"minor":4}]},{"kind":"cache","version":[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":[{"major":1,"minor":0}]},{"kind":"toolchains","version":[{"major":1,"minor":0}]}]},"generators":[{"extraGenerators":[],"name":"Watcom WMake","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Ninja Multi-Config","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Ninja","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Unix Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Green Hills MULTI","platformSupport":true,"toolsetSupport":true}],"serverMode":false,"version":{"isDirty":false,"major":3,"minor":24,"patch":2,"string":"3.24.2","suffix":""}}but my build run failed.
$ ./bin/qt-cmake -E capabilities
CMake Error: Unknown argument -E
CMake Error: Run 'cmake --help' for all supported options.How can I add my built qt version to qt creator, so I can develop my project using qt creator, instead of command line.
-
qt-cmake
is just a wrapper that sets the rightCMAKE_TOOLCHAIN_FILE
parameter for CMake.It's not meant to be used by Qt Creator.
If you want to have the same behavior in Qt Creator, you need to create a Kit that has the
CMAKE_TOOLCHAIN_FILE
parameter in the Kit's CMake parameters dialog.