[Interest] CMake - List Sources: qt_add_executable vs qt_add_qml_module

ekke ekke at ekkes-corner.org
Tue Jan 30 11:05:32 CET 2024


... ported my apps from 5.15 to 6.6, now on my way from QMake to CMake

App is not modularized yet (ToDo for later ;-)
So I only have ONE QML Module directly loaded at start:

main.cpp:
engine.loadFromModule("Main_Module", "Main");

qt_add_executable(my_app
     main.cpp
)

include(my_qml_files.cmake)

qt_add_qml_module(my_app
     URI Main_Module
     QML_FILES ${myqmlfiles}
     ... RESOURCES, SOURCES...
)

I can list all my other cpp SOURCES in qt_add_executable or in 
qt_add_qml_module,
what is recommended in this case ?

thx

ekke



More information about the Interest mailing list