mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-05 17:47:30 +03:00
Refactored flags handling (add-pkg).
This commit is contained in:
parent
9ef01c67c6
commit
7ed48b733b
@ -26,3 +26,11 @@
|
||||
|
||||
(defndynamic add-lib [lib]
|
||||
(Project.config "libflag" lib))
|
||||
|
||||
(defndynamic pkg-config [pkg flags]
|
||||
(Dynamic.String.join ["`pkg-config " pkg " " flags "`"]))
|
||||
|
||||
(defndynamic add-pkg [pkg]
|
||||
(do
|
||||
(add-cflag (pkg-config pkg "--cflags --static"))
|
||||
(add-lib (pkg-config pkg "--libs --static"))))
|
||||
|
@ -1,6 +1,5 @@
|
||||
(system-include "GLFW/glfw3.h")
|
||||
(add-cflag "`pkg-config glfw3 --cflags --static`")
|
||||
(add-lib "`pkg-config glfw3 --libs --static`")
|
||||
(add-pkg "glfw3")
|
||||
|
||||
(defmodule GLFW
|
||||
(register init (λ [] Int) "glfwInit")
|
||||
|
@ -3,8 +3,7 @@
|
||||
(local-include "../core/SDLHelper.h")
|
||||
|
||||
(not-on-windows
|
||||
(add-cflag "`pkg-config SDL2 --cflags --static`")
|
||||
(add-lib "`pkg-config SDL2 --libs --static`"))
|
||||
(add-pkg "SDL2"))
|
||||
|
||||
(defmodule SDL
|
||||
(defmodule Windows
|
||||
|
@ -1,6 +1,5 @@
|
||||
(system-include "SDL2/SDL2_gfxPrimitives.h")
|
||||
(add-cflag "`pkg-config SDL2_gfx --cflags --static`")
|
||||
(add-lib "`pkg-config SDL2_gfx --libs --static`")
|
||||
(add-pkg "SDL2_gfx")
|
||||
|
||||
(defmodule GFX
|
||||
(doc thick-line-rgba "Draw a line from x1, y1 to x2, y2 with the width `width` and color r, g, b, a.")
|
||||
|
@ -1,7 +1,6 @@
|
||||
(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`"))
|
||||
(add-pkg "SDL2_image"))
|
||||
|
||||
(defmodule IMG
|
||||
(defmodule Windows
|
||||
|
@ -1,6 +1,5 @@
|
||||
(system-include "SDL2/SDL_mixer.h")
|
||||
(add-cflag "`pkg-config SDL2_mixer --cflags --static`")
|
||||
(add-lib "`pkg-config SDL2_mixer --libs --static`")
|
||||
(add-pkg "SDL2_mixer")
|
||||
(Project.config "cflag" "-Wno-incompatible-pointer-types-discards-qualifiers")
|
||||
|
||||
(register-type Mix_Chunk)
|
||||
|
@ -1,6 +1,5 @@
|
||||
(system-include "SDL2/SDL_ttf.h")
|
||||
(add-cflag "`pkg-config SDL2_ttf --cflags --static`")
|
||||
(add-lib "`pkg-config SDL2_ttf --libs --static`")
|
||||
(add-pkg "SDL2_ttf")
|
||||
(Project.config "cflag" "-Wno-incompatible-pointer-types-discards-qualifiers")
|
||||
|
||||
(register-type TTF_Font)
|
||||
|
Loading…
Reference in New Issue
Block a user