Compiling MuseScore on macOS without full Xcode
With reference to Trouble with pre-compiled headers on macOS from last year, starting a new thread in this forum, since that is what Iasconic recommended.
I understand it is possible to compile MuseScore on macOS, if the headers were modified accordingly to remove references to or dependencies on full Xcode, e.g. only require the "Xcode Command Line Tools"
shoogle did this great write-up of Qt without Xcode
Would it be possible to modify the MuseScore headers to compile without full Xcode?
My reasons/justifications (borrowed from shoogle’s document)
- Xcode is a 6GB download and on disk. With either bandwidth or SSD space at a premium, downloading the full Xcode and keeping it up to date is unnecessary and wasteful.
- Qt doesn't actually need the full IDE. Only Xcode's command line utilities are required for macOS application development.
- Developers may never actually use Xcode. They can program in Qt Creator, like they do in Windows and Linux.
The use case specific to MuseScore
- Compiling from source is a lot more efficient that downloading the nightlies regularly.
- For the casual user just starting out with MuseScore from source, the huge Xcode download might be discouraging, or even prohibitive.
Comments
This shouldn't be too difficult since the alternative to Xcode is Make, which is already used on Unix systems. It probably just requires going through all the CMakeLists.txt files and looking for things like:
and, if necessary, replacing it with either:
or with:
depending on whether the steps with Make on macOS are different to the other platforms.
Of course there are a few extra details to be aware of:
if (WIN32)
", "if (MSVC)
" and "if (MINGW)
").#define
and#ifdefined
statements in the header files.