Skip to content

SpookyScaryDev/SDL2

Repository files navigation

SDL2

This is a copy of the SDL source code with the premake build system added. It was loosely based on the premake4 build system for SDL written by renpy, however I have only learned premake5 and almost all of that knowledge is not applicable to premake4.

The official source release of SDL can be found here.

Building SDL2 with premake5

So far, the premake files I have written only support Windows. As such I have only included the batch files for building on Windows. I will add support for Linux and MacOS if and when I need it or if there is sufficient demand.

Windows

To build the solution and project files for SDL2:

  1. Install Git (or Github Desktop if you prefer) and clone the repository in the command prompt with
    git clone https://github.com/SpookyScaryStudios/SDL2 target/directory
  2. Run GenerateProjectFiles.bat and open the SDL.sln file in the root directory.

To link SDL2 to another project:

  1. Clone the repository into your project as a git submodule in the command prompt with
    git submodule add https://github.com/SpookyScaryStudios/SDL2 target/directory
  2. Include SDL2.lua and SDL2main.lua into your project's premake file. These can be found in the Build directory, in folders of the same name.

Structure

The project has a directary structure similar to that of Unreal Engine:

Directory Description
Binaries Binary directory.
Build Where premake files, batch files and binaries are stored.
docs SDL documentation (copied from the SDL source).
include SDL include path (copied from the SDL source).
Intermediate Intermediates and project files.
src SDL source code (copied from the SDL source).

Contributing

Please feel free to contribute to this repository by reporting errors or even submitting pull requests. I really appreciate it if you do, and will try to resolve the issue or merge the pull request as soon as possible.

License

This project is licenced under the zlib licence, since it is a modified version of SDL2.

About

SDL2 source with added premake.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published