Re: Set-up SDL on Mac OSX without Xcode

Kai Sterker <[email protected]> Sun, 15 Jan 2017 11:10:47 +0100
Newsgroups gmane.comp.lib.sdl
Message-ID <CACtHX9x6zRdC1XeEDcuqhtY4CDOki_WtE35HMq838JAAZp9qDQ@mail.gmail.com>
A bit late to reply, but perhaps you will find the information below
helpful once you're further into development and looking for a more
sophisticated way to build from the command line on OSX (and elsewhere).

Specifically, for macOS what I tend to do is creating a /usr/local
directory and then installing all the dependencies like SDL there, by
downloading their source packages and compiling them the usual way (I.e.
running ./configure, make and make install). While this sometimes proved
problematic 5 or 10 years ago, nowadays this normally works out of the box.
The benefit of having all that stuff in /usr/local is that (a) it does not
interfere with anything that comes with macOS, and (b) once it comes to
create an application bundle, I know exactly which libraries to include in
the bundle.

When it comes to building my own project, I also use GNU autoconf as a
build system, but frankly plain Makefiles or CMake or anything else will
work more or less equally well. This part of my build is cross-platform, so
the same commands work on Linux, macOS and Windows (using MSys2). But on
top of that, I have written a number of shell scripts that contain
platform-specific steps of the build, such as the aforementioned App bundle
creation on macOS, as well as building a disk image and codesigning for
distribution.

Feel free to have a look at the (brief) build instructions, and the
macOS-specific scripts:

http://git.savannah.gnu.org/cgit/adonthell.git/tree/README.MacOSX
http://git.savannah.gnu.org/cgit/adonthell.git/tree/make_osx_bundle.sh
http://git.savannah.gnu.org/cgit/adonthell/adonthell-wastesedge.git/tree/make_osx_bundle.sh
http://git.savannah.gnu.org/cgit/adonthell/adonthell-wastesedge.git/tree/osx/make_dmg.sh

Note that in my case there is the added complexity of having to build two
projects and merge the outcome to get a working application. Normally a
single script would be enough to fully create the App bundle.

Kai


On Sat, Jan 14, 2017 at 10:52 PM, Karl <[email protected]> wrote:

> I should have updated the topic--I was able to get SDL working with
> homebrew, and the basic makefile is set as well.
> Without homebrew, would I just download the developer dmg on the site and
> run the same commad?
>
> In any case, what I have seems to be working.
>
> _______________________________________________
> SDL mailing list
> [email protected]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org