mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-26 05:45:37 +03:00
20 lines
681 B
Plaintext
20 lines
681 B
Plaintext
(not-on-windows
|
|
(system-include "SDL2/SDL_image.h")
|
|
(add-cflag "`pkg-config SDL2_image --cflags --static`")
|
|
(add-lib "`pkg-config SDL2_image --libs --static`"))
|
|
|
|
(defmodule IMG
|
|
(defmodule Windows
|
|
(defdynamic header-path "C:\\SDL2_image-2.0.4\\include")
|
|
(defdynamic library-path "C:\\SDL2_image-2.0.4\\lib\\x86\\")))
|
|
|
|
(windows-only
|
|
(system-include "SDL_image.h")
|
|
(add-cflag (str "-I" IMG.Windows.header-path))
|
|
(add-lib (str "/link " IMG.Windows.library-path "SDL2_image.lib ")))
|
|
|
|
(defmodule IMG
|
|
(register load-texture (Fn [(Ptr SDL_Renderer) (Ptr Char)] (Ptr SDL_Texture)) "IMG_LoadTexture")
|
|
(register load (Fn [(Ptr Char)] (Ptr SDL_Surface)) "IMG_Load")
|
|
)
|