In principle, CMake should be able to cross-compile just fine and CCache shouldn't care.
Maybe homebrew meddles with the default configuration and this will break things, though.
We shall see.
The homebrew package should add qmake to the path, and qmake knows where Qt is.
If this works for brew, it should work for not-brew, too.
This *might* give a trailing /lib on the path CMake sees, but CMake implicitly tries adding a /lib suffix to paths in CMAKE_PREFIX_PATH, so this shouldn't make a difference to anything.
https://gitlab.com/OpenMW/openmw/-/merge_requests/4759#note_2606465930 was marked as resolved without really being resolved, so bypassed normal review and was merged prematurely.
We tell developers to run these scripts on their machines, so it's rude to install things we don't have to over the top of an existing installation.
If the existing installation was via brew via the default sources, then it's clever enough not to break things, but if it's using custom sources or the install is outside of brew, it'll either break or overwrite what's there.
The three tools we've historically checked before overwriting all have an upstream MacOS distribution that isn't through brew, so it's decently likely that they exist, and we've never agreed to drop support for them.
I went a little further than the original code:
* I added a check before overwriting brew itself.
I don't know whether the install script would notice this anyway.
* I added a check to ensure it's specifically Qt 6.x that's already installed as we dropped support for Qt 5.
* I added the checks back to both scripts even though !4759 only removed them from one.
There only used to be one script, and when it was split, the checks only made it to one copy.
I could have gone further by adding checks for other tools before we install them, but we didn't have these in the past and I couldn't be bothered.
Try ARCHPREFERENCE environment variable
Go back to using subshell
ARCHPREFERENCE won't retroactively relaunch the current shell.
Also use /usr/local/bin/brew as the x86_64 version we just installed isn't added to the path by default.
Fresh shell for brew installer?
escape things better
This commit message was very nearly just emoji or a rant about sh-compatible shells.
what is going on?
Nested quotes?
Remove .cpp files with small amount of code which don't have additional
includes compared to corresponding .hpp files. This reduces the total
size of preprocessed code of the project and should reduce compilation
time.