[Qt-creator] No more "Link with Qt..." step for own Qt Creator builds

Cristian Adam cristian.adam at qt.io
Fri Sep 10 17:47:40 CEST 2021


While building Qt Creator have you encountered the situation when your 
Kits and Qt versions would disappear?

The fix would be to click /"Link with Qt..."/ in Options -> Kits -> Qt 

There is another way, when building Qt Creator from Qt Creator, the 
built Qt Creator could inherit the QtCreator.ini automatically when the 
following code is placed in the Qt Creator's repository as PreLoad.cmake 
or QtCreatorPackageManager.cmake file:

# When building with Qt Creator 4.15+ do the "Link with Qt..." automatically
     *get_filename_component*(auto_setup_dir"${CMAKE_PROJECT_INCLUDE_BEFORE}"  DIRECTORY)
     *if*  (EXISTS  "${qt_creator_ini}")
         *file*(STRINGS  "${qt_creator_ini}"  install_settingsREGEX  "^InstallSettings=.*$")
         *if*  (install_settings)
             *string*(REPLACE  "InstallSettings="  ""  install_settings"${install_settings}")
             *file*(TO_CMAKE_PATH  "${auto_setup_dir}/.."  install_settings)
         *file*(WRITE  ${CMAKE_BINARY_DIR}/share/qtcreator/QtProject/QtCreator.ini

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210910/1d933f05/attachment.html>

More information about the Qt-creator mailing list