Details
-
User Story
-
Resolution: Fixed
-
P2: Important
-
None
-
6.2.0 RC, 6.2, 6.3
-
None
Description
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 APIdone in <https://codereview.qt-project.org/c/qt/qtbase/<ins>/373517>fix qml module generation to use qt_add_qml_module where possibledone in <https://codereview.qt-project.org/c/qt/qtbase/</ins>/369502>don't generate the INSTALL_EXAMPLEDIR / INSTALL_EXAMPLESDIR stuff- done in <https://codereview.qt-project.org/c/qt/qtbase/<ins>/399125>handle required vs optional packages better- done in <https://codereview.qt-project.org/c/qt/qtbase/</ins>/398892>generate a single find_package call (or 2 when mixing required + optional) instead of one per line- done in https://codereview.qt-project.org/c/qt/qtbase/+/398826- 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 - done
it would be nice if we can detect when pro2cmake is run on a subdir .pro file, so that we don't embed needless calls to cmake_minimum_required, project, CMAKE_INCLUDE_CURRENT_DIR, CMAKE_AUTOMOC, find_package
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