I'm compiling the same Qt/QML application on Windows, Linux, MacOS, WebAssembly, iOS, and Android. So far, I found that detection of Qt's components only works on Windows, regardless whether I'm using it to compile a Windows version or cross-compiling to Android. It doesn't work neither on MacOS nor on Linux.
I tried pointing CMAKE_PREFIX_PATH to Qt's installation prefix (~/Qt/5.15.0/wasm_32/), but it keeps on complaining about QtConfig.cmake. The only alternative I found to work was passing -DQt5_DIR for QtConfig.cmake to be found, but then it would keep on asking for at least 10 more .cmake files which I need to pass their paths one by one using _DIR variables. This way I would always end with a huge command and it's a major source of annoyance.
Note that I do not want to install Qt using apt or any other package manager. I only want to use Qt's installer since it gives me the flexibility of having multiple versions targeting multiple frameworks.
Is it a problem in Qt? CMake? Ubuntu?
Qt: 5.15.0
CMake: 3.18.0
Ubuntu: 20.04
Now I'm sure that I found it: The toolchains had this: set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
It doesn't look like setting CMAKE_PREFIX_PATH was enough. I had to do this also: list(APPEND CMAKE_FIND_ROOT_PATH "~/Qt/5.15.0/wasm_32")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With