I thought I would share here some steps I had to go through to make master build on macOS Sierra and homebrew, since the build instructions on the wiki seem outdated.
Run make and it should run until the final link step.
Make the following changes to the link command in CMakeFiles/ufo.dir/link.txt:
Replace the -framework OpenGL -lGL -lrt link flags with just -framework OpenGL (sometimes -framework OpenGL is missing entirely)
Add in the missing linker flags for libintl: -L/usr/local/opt/gettext/lib -lintl (this can go at the end of the line)
Run make again and the ufo binary should be made.
These instructions (with similar edits for step 5 for CMakeFiles/ufotestall.dir/link.txt) seem to work for all target other than UFORADIANT (which requires GTK and I didn't figure out how to get it to work yet). Hopefully, these instructions will be helpful to figure out how to get the CMake build process working on macOS.
I thought I would share here some steps I had to go through to make master build on macOS Sierra and homebrew, since the build instructions on the wiki seem outdated.
brew install gettext sdl2 sdl2_mixer sdl2_ttf libogg libvorbis libpng libjpeg
Create build directory and run
ccmake
. Undert
(advanced options), set:Make the following changes to the libcurl calls:
Run
make
and it should run until the final link step.Make the following changes to the link command in
CMakeFiles/ufo.dir/link.txt
:-framework OpenGL -lGL -lrt
link flags with just-framework OpenGL
(sometimes-framework OpenGL
is missing entirely)libintl
:-L/usr/local/opt/gettext/lib -lintl
(this can go at the end of the line)Run
make
again and theufo
binary should be made.These instructions (with similar edits for step 5 for
CMakeFiles/ufotestall.dir/link.txt
) seem to work for all target other thanUFORADIANT
(which requires GTK and I didn't figure out how to get it to work yet). Hopefully, these instructions will be helpful to figure out how to get the CMake build process working on macOS.