Important: Please read the Qt Code of Conduct -

Qt5.11 Quick Compiler integration with cmake target_sources

  • Hi !

    I was trying to integrate the Qt Quick Compiler that was made available for free in Qt5.11 in my cmake build.

    The documentation says to replace the call to qt5_add_resources by qtquick_compiler_add_resources in cmake.

    Since I am using AUTORCC, I do not have any qt5_add_resources in my CMake file, instead, I have

    target_sources(${PROJECT_NAME} PRIVATE qml.qrc)

    Since I am heavily using target_sources in the rest of my CMake files, I would like to know how could I use the QtQuickCompiler with target_sources

    Note : I don't know if the documentation has been updated after Qt5.11 (where QtQuickCompiler went from an external module to being a part of the Quick module). Maybe I am trying to integrate the compiler the "old" way and another way exists.


Log in to reply