osxcross
osxcross copied to clipboard
Better support (or documentation) for Qt applications
Hello, I'm trying to port my Linux/Windows application to OSX too. It currently compiles and runs fine on a native environment, but I would like to do compilation from a docker container (like Linux and Windows counterparts) to better automate the release process, which is why I bumped into osxcross :)
I wasn't able to get it working, though: other dependencies seem to work fine, but Qt gives me a lot of issues. I'm unable to compile it from scratch, it seems a really difficult task, lots of files to patch, and it doesn't even work at the end. Installing it from macports is relatively easier, after a few workarounds I am able to let cmake detect Qt properly, but I still get a lot of compilation errors.
Is there a better way to do this?
Thanks Marco
Cross compiling Qt for MacOS X is not officially supported. However, I managed to build Qt 5 with osxcross (at least x86_64, i386 doesn't work yet).
After doing some cleanup, I can provide my build scripts (which include some patches for Qt to enable cross compilation). I also created a CMake toolchain file for building CMake-based projects. I currently also get compile errors when using CMake because Qt doesn't pull dependencies of static libs correctly but I guess I can fix that.
Would be awesome if you could share your build scripts. I also have big changes in my queue but right now I have to work on a lot of other projects. :/
I ended up with the following build scripts for a static Qt build: https://github.com/Martchus/PKGBUILDs