-
Notifications
You must be signed in to change notification settings - Fork 0
/
anuklear.gpr
50 lines (39 loc) · 1.69 KB
/
anuklear.gpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
with "config/anuklear_config.gpr";
project ANuklear is
for Languages use ("C", "Ada");
for Library_Name use "anuklear";
for Library_Version use Project'Library_Name & ".so." & ANuklear_Config.Crate_Version;
type Renderer_Type is ("sdl2");
Renderer : Renderer_Type := external ("RENDERER", "sdl2");
Renderer_Source := "";
case Renderer is
when "sdl2" =>
Renderer_Source := "sdl2";
end case;
for Source_Dirs use ("src/", "src/c/", "src/renderer/" & Renderer_Source, "config/");
for Object_Dir use "obj/" & ANuklear_Config.Build_Profile;
for Create_Missing_Dirs use "True";
for Library_Dir use "lib";
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type := external ("ANUKLEAR_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
package Compiler is
C_Switches := ("-I../../include");
case Renderer is
when "sdl2" =>
for Switches ("libnuklear.c") use ("-DRENDER_SDL=1", "-ggdb");
-- for Switches ("renderer.c") use C_Switches & ("-DRENDER_SDL", "-I../../Nuklear/demo/sdl_renderer");
end case;
-- for Switches ("libnuklear.c") use C_Switches;
-- for Default_Switches ("C") use C_Switches;
for Default_Switches ("Ada") use ANuklear_Config.Ada_Compiler_Switches &
("-gnat2022", "-gnata", "-gnato", "-gnatwa", "-gnatwaJ", "-gnaty", "-gnaty-s", "-gnatyO",
"-gnatyM120", "-gnatyx");
end Compiler;
package Binder is
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
end Binder;
package Install is
for Artifacts (".") use ("share");
end Install;
end ANuklear;