Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ SDL2_gfx_jll = "323748d4-b4be-59be-a22c-1904c60787cb"
SDL2_image_jll = "41f3cfe1-fd11-58ad-8074-b9730c29438b"
SDL2_jll = "ab825dc5-c88e-5901-9575-1e5e20358fcf"
SDL2_mixer_jll = "7e88e5ca-120e-58e7-9660-b2187fd466c0"
SDL2_net_jll = "f85291cd-a23d-5685-85d1-de13e1abbd3f"
SDL2_ttf_jll = "ca9d4746-8a27-5104-babe-80f83b336947"
alsa_plugins_jll = "5ac2f6bb-493e-5871-9171-112d4c21a6e7"

[compat]
CEnum = "0.4"
ColorTypes = "0.8, 0.9, 0.10, 0.11"
SDL2_gfx_jll = "1.0.3"
SDL2_gfx_jll = "1.0.4"
SDL2_image_jll = "2.6.2"
SDL2_jll = "2.24.2"
SDL2_mixer_jll = "2.6.2"
SDL2_net_jll = "2.2.0"
SDL2_ttf_jll = "2.0.15"
julia = "1.3"

Expand Down
6 changes: 5 additions & 1 deletion gen/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using SDL2_mixer_jll
using SDL2_image_jll
using SDL2_ttf_jll
using SDL2_gfx_jll
using SDL2_net_jll

cd(@__DIR__)

Expand All @@ -18,6 +19,7 @@ sdl_framerate_h = joinpath(sdl_gfx_include_dir, "SDL2", "SDL2_framerate.h")
sdl_gfxPrimitives_h = joinpath(sdl_gfx_include_dir, "SDL2", "SDL2_gfxPrimitives.h")
sdl_imageFilter_h = joinpath(sdl_gfx_include_dir, "SDL2", "SDL2_imageFilter.h")
sdl_rotozoom_h = joinpath(sdl_gfx_include_dir, "SDL2", "SDL2_rotozoom.h")
sdl_net_h = joinpath(SDL2_net_jll.artifact_dir, "include", "SDL2", "SDL_net.h")

local_include_dir = joinpath(@__DIR__, "include")
isdir(local_include_dir) && rm(local_include_dir, recursive=true)
Expand All @@ -29,6 +31,7 @@ cp(sdl_framerate_h, joinpath(@__DIR__, "include", "SDL2", basename(sdl_framerate
cp(sdl_gfxPrimitives_h, joinpath(@__DIR__, "include", "SDL2", basename(sdl_gfxPrimitives_h)))
cp(sdl_imageFilter_h, joinpath(@__DIR__, "include", "SDL2", basename(sdl_imageFilter_h)))
cp(sdl_rotozoom_h, joinpath(@__DIR__, "include", "SDL2", basename(sdl_rotozoom_h)))
cp(sdl_net_h, joinpath(@__DIR__, "include", "SDL2", basename(sdl_net_h)))

sdl_mixer_h = joinpath(local_include_dir, "SDL2", "SDL_mixer.h")
sdl_image_h = joinpath(local_include_dir, "SDL2", "SDL_image.h")
Expand All @@ -38,13 +41,14 @@ sdl_framerate_h = joinpath(local_include_dir, "SDL2", "SDL2_framerate.h")
sdl_gfxPrimitives_h = joinpath(local_include_dir, "SDL2", "SDL2_gfxPrimitives.h")
sdl_imageFilter_h = joinpath(local_include_dir, "SDL2", "SDL2_imageFilter.h")
sdl_rotozoom_h = joinpath(local_include_dir, "SDL2", "SDL2_rotozoom.h")
sdl_net_h = joinpath(local_include_dir, "SDL2", "SDL_net.h")


options = load_options(joinpath(@__DIR__, "generator.toml"))

args = get_default_args()
push!(args, "-I$local_include_dir")

ctx = create_context([sdl_h, sdl_mixer_h, sdl_image_h, sdl_ttf_h, sdl_framerate_h, sdl_gfxPrimitives_h, sdl_imageFilter_h, sdl_rotozoom_h], args, options)
ctx = create_context([sdl_h, sdl_mixer_h, sdl_image_h, sdl_ttf_h, sdl_framerate_h, sdl_gfxPrimitives_h, sdl_imageFilter_h, sdl_rotozoom_h, sdl_net_h], args, options)

build!(ctx)
4 changes: 2 additions & 2 deletions gen/generator.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[general]
library_name = "libsdl2"
library_names = {"SDL2/SDL_mixer.h" = "libsdl2_mixer", "SDL2/SDL_image.h" = "libsdl2_image", "SDL2/SDL_ttf.h" = "libsdl2_ttf", "SDL2/SDL2_framerate.h" = "libsdl2_gfx", "SDL2/SDL2_gfxPrimitives.h" = "libsdl2_gfx", "SDL2/SDL2_imageFilter.h" = "libsdl2_gfx", "SDL2/SDL2_rotozoom.h" = "libsdl2_gfx"}
library_names = {"SDL2/SDL_mixer.h" = "libsdl2_mixer", "SDL2/SDL_image.h" = "libsdl2_image", "SDL2/SDL_ttf.h" = "libsdl2_ttf", "SDL2/SDL2_framerate.h" = "libsdl2_gfx", "SDL2/SDL2_gfxPrimitives.h" = "libsdl2_gfx", "SDL2/SDL2_imageFilter.h" = "libsdl2_gfx", "SDL2/SDL2_rotozoom.h" = "libsdl2_gfx", "SDL2/SDL_net.h" = "libSDL2_net" }
output_file_path = "../src/LibSDL2.jl"
module_name = "LibSDL2"
jll_pkg_name = "SDL2_jll"
jll_pkg_extra = ["SDL2_mixer_jll", "SDL2_image_jll", "SDL2_ttf_jll", "SDL2_gfx_jll"]
jll_pkg_extra = ["SDL2_mixer_jll", "SDL2_image_jll", "SDL2_ttf_jll", "SDL2_gfx_jll", "SDL2_net_jll"]
export_symbol_prefixes = ["TTF_", "IMG_", "Mix_", "SDL_", "MIX_", "RW_", "AUDIO_", "KMOD_", "HAVE_", ]
prologue_file_path = "./prologue.jl"
use_deterministic_symbol = true
Expand Down
Loading
Loading