I've been experimenting a bit with premake5 xcode project generation, and I got the openmpt-trunk to build in xcode with the changes attached in the message (premake_xcode_patch.txt)
The patch contains the following changes:
1) some header search paths adjusted: ogg headers are included with angle bracket style which requires them to be in the system header search path on xcode (mpt-libopenmpt.lua, ext-vorbis.lua, ext-ogg.lua)
2) explicitly turned on build flag -std=c++14 to tell xcode to gracefully cope with some recent changes in openmpt C++ code (mpt-libopenmpt.lua)
3) filtered out the visual studio specific warning elimination flags wd4101, /wd4244, /wd4267 when action is xcode4 (ext-vorbis.lua)
After applying the patch, you can run premake to generate the xcode workspace / project files
premake5 ---file=build/premake/premake.lua --group=libopenmpt --os=macosx xcode4
Then you can open libopenmpt.xcodeproj in xcode. The xcode module in premake seems to be a bit dated, and xcode will suggest some updates to be done to the file once you open the project. I have not delved further into the premake xcode module sources yet, it might be rather lightweight changes to make the output match more recent xcode and also to support iOS in addition to macosx in the code generation.
If you're building for macOS (osx), you're good to go. I'm building libopenmpt for iOS, so a couple of changes in the build settings are needed (premake does not support ios as platform atm) :
- Set Base SDK to "Latest iOS"
- Set Architectures to "Standard architectures"
Now I can get i386 binary by building for iPhone5 simulator, x86_64 binary by building for iPhone5s or later and arm binaries by building for iOS device (or archiving in xcode terms). The xcode project generated by premake is set up for desktop, so some terminal magic is needed to get a fat .a file if you like to work with a single static lib. In short, I ran the builds, collected the resulting architecture specific binaries, and used lipo tool to create a universal binary.
It will require some additional time & effort to end up with something that could be used to produce automated releasable packaging without any manual steps, but if you're on macOS/iOS the above guideline will get you going.
I hope we can get the lua file modifications in trunk provided that they won't break existing builds/tests.