qt6_add_qml_module How to configure include directory with CMake
Unsolved
Qt 6
-
Hi, I'm trying to expose my cpp-based class as a qml item with qml cmake api.
Afaik,qt6_add_qml_module
is introduced to CMake in Qt6 so we don't have to useqmlRegisterType
, as noted in this link and this SO answer also.- I just have an issue with configuring include directories by
target_include_directories
, which works well as usual before me addingqt6_add_qml_module
. - The example shown in the link above is quite simple in the way that both
extrathing.h/.cpp
stay under the same folder, but typically our sources are put into different hierarchical folders.
-> In that case, cpp files specified underSOURCES
could not recognize include paths configured bytarget_include_directories
anymore.
Would there be some way to help solve this do you guys happen to know? I also checked qt-custom-cmake commands but it seems to have no specific one for the purpose.
I'd really appreciate if @SGaist or someone in the champion group could share about some idea.
Thank you! - I just have an issue with configuring include directories by