QML ahead-of-time compilation?

I’m currently starting to develop my first app for Sailfish OS.

While writing the cmake project file for it, I wanted to set up ahead-of-time compilation for the QML files, but I can’t seem to find a package containing Qt5QuickCompilerConfig.cmake for the build targets. On the desktop that file is part of the qtdeclarative package itself, but that’s obviously not the case for the Sailfish build targets…
I’ve tried a few of the RPMs with promising names at random, but none of them contained the cmake script for the Qt5QuickCompiler.

The question now is, if Ahead of Time compilation for QML files is supported for Sailfish apps, and if yes, which RPM needs to be installed into the build target for working cmake integration?

Thanks in advance,
Andreas

Welcome on board. I am not aware of any compilation for QML on SFOS and I suspect we don’t have such support. Although, that shouldn’t derail your efforts and non-compiled QML works quite well

The Qt5 Qml compiler was added in Qt 5.10, if I remember exactly. SailfishOS is still stuck on 5.6, so you will have a hard time getting that working.

1 Like

Thanks a lot! I should have checked the version… I’ll just ship the QML files directly then.

I was asking because I noticed a (small) delay when opening complex sub pages for the first time, and thought ahead-of-time compilation could improve it. However it’s barely noticeable, so I think it’s not worth the effort getting it to work if it’s not supported out of the box.