Probably as a result of a very troublesome install of GtkAda with Alire on my computer I now have two versions of GtkAda.gpr. The question is which one is the correct one.
with “config/gtkada_config.gpr”;
project Gtkada is
for Library_Name use “Gtkada”;
for Library_Version use Project’Library_Name & “.so.” & Gtkada_Config.Crate_Version;
for Source_Dirs use (“src/”, “config/”);
for Object_Dir use “obj/” & Gtkada_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 (“GTKADA_LIBRARY_TYPE”, external (“LIBRARY_TYPE”, “static”));
for Library_Kind use Library_Type;
package Compiler is
for Default_Switches (“Ada”) use Gtkada_Config.Ada_Compiler_Switches;
end Compiler;
package Binder is
for Switches (“Ada”) use (“-Es”); – Symbolic traceback
end Binder;
package Install is
for Artifacts (“.”) use (“share”);
end Install;
end Gtkada;
The second is:
with “../gtkada_shared”;
library project GtkAda is
case GtkAda_Shared.Need_Objective_C is
when “yes” => for Languages use (“C”, “Ada”, “Objective-C”);
when “no” => for Languages use (“C”, “Ada”);
end case;
Version := GtkAda_Shared.Version;
– Put “generated” first, so that files are preferably taken from there
– even if they still exist in “.”
for Source_Dirs use (“generated”, “.”);
for Library_Kind use GtkAda_Shared.Library_Kind;
for Library_Name use “gtkada”;
for Library_Version use
“lib” & Project’Library_Name & GtkAda_Shared.So_Ext & “.” & Version;
case GtkAda_Shared.Library_Kind is
when “static-pic” | “relocatable” =>
– Objects used for static-pic and relocatable are exactly the same
for Object_Dir use “obj/gtkada/relocatable”;
for Library_Dir use “lib/gtkada/relocatable”;
when “static” =>
case GtkAda_Shared.So_Ext is
when “.dll” | “.dylib” =>
– On Windows and Darwin, objects are always position
– independent.
for Object_Dir use “obj/gtkada/relocatable”;
for Library_Dir use “lib/gtkada/relocatable”;
when others =>
– This is not the case in general for Unix systems such
– as Linux.
for Object_Dir use “obj/gtkada/static”;
for Library_Dir use “lib/gtkada/static”;
end case;
end case;
case GtkAda_Shared.Library_Kind is
when “relocatable” =>
for Leading_Library_Options use GtkAda_Shared.Ldflags;
for Library_Options use GtkAda_Shared.Gtk_Libs;
when others =>
null;
end case;
package Builder renames GtkAda_Shared.Builder;
package Naming renames GtkAda_Shared.Naming;
package Compiler renames GtkAda_Shared.Compiler;
package Binder renames GtkAda_Shared.Binder;
package IDE renames GtkAda_Shared.IDE;
package Linker is
for Linker_Options use GtkAda_Shared.Gtk_Libs;
end Linker;
package Install is
for Artifacts (“share/gps/plug-ins”) use (“../xml/gtkada.xml”);
for Artifacts (“share/doc/gtkada/gtkada_ug”) use
(“../docs/gtkada_ug/_build/html/*”,
“../docs/gtkada_ug/_build/latex/GtkAda.pdf”);
for Artifacts (“share/doc/gtkada”) use
(“../docs/gtkada_rm/gtkada_rm”);
end Install;
end GtkAda;