Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96799

Improve pro2cmake so it's usable as an initial step for converting qmake user projects to CMake



    • Type: User Story
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 RC, 6.2, 6.3
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:


      The intention is not to advertise it as fool-proof solution for converting qmake user projects to CMake, but rather as a helper that can hopefully handle 60-80% of usual conversion boilerplate.

      Off the top of my head some implementation things to consider:

      • default to generating public CMake Qt API instead of private API done in https://codereview.qt-project.org/c/qt/qtbase/+/373517
      • fix qml module generation to use qt_add_qml_module where possible - WIP in https://codereview.qt-project.org/c/qt/qtbase/+/369502
      • handle required vs optional packages better
      • generate a single find_package call (or 2 when mixing required + optional) instead of one per line
      • see if we can handle plugins to be generated as qt_add_plugins and libs as qt_add_library
      • possibly generate qt_finalize_target + MANUAL_FINALIZATION as the default, so that users are aware of the API
      • possibly handle translations
      • check how subdir projects are handled for user projects

      And some product things to consider:

      • do we want to ship it in some form, or just tell people to git clone qtbase to get the script (it's not one file, there are helpers)
      • is a blog post enough, or do we want some documentation on the wiki or docs.qt.io
      • what parts should be documented? most options were for qt internal usage, some features i would not document or maybe even disable, like the special case preservation mechanism


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            qtbuildsystem Qt Build System Team
            alexandru.croitor Alexandru Croitor
            0 Vote for this issue
            6 Start watching this issue



                Gerrit Reviews