Skip to content

Commit caeb367

Browse files
committed
Ensure that project used by nsis on windows is working
* take advantage of GTK_LIBS variable to avoid hardcoding of library list * remove need for intermediate c library when installing using nsis (gprbuild will be used instead of gnatmake during installation) * fix gtkada library name Part of N617-029
1 parent 8743113 commit caeb367

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

aclocal.m4

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,16 @@ main (int argc, char** argv)
315315
AC_SUBST(GTK_CFLAGS)
316316
AC_SUBST(GTK_LIBS)
317317
AM_TO_GPR($GTK_CFLAGS, GTK_CFLAGS_GPR)
318-
AM_TO_GPR($GTK_LIBS, GTK_LIBS_GPR)
318+
319+
dnl On windows gtk will be embedded along with gtk distrib. In that
320+
dnl case we need to adjust switches so that gtkada.gpr packaged in
321+
dnl lib/gnat is usable
322+
323+
case $build_os in
324+
*mingw*) GTK_LIBS="-L../../lib $GTK_LIBS";;
325+
esac
326+
327+
AM_TO_GPR($GTK_LIBS, GTK_LIBS_GPR)
319328
rm -f conf.gtktest
320329
])
321330

configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3672,6 +3672,12 @@ $as_echo "yes" >&6; }
36723672
36733673
36743674
3675+
3676+
case $build_os in
3677+
*mingw*) GTK_LIBS="-L../../lib $GTK_LIBS";;
3678+
esac
3679+
3680+
36753681
value=$GTK_LIBS
36763682
36773683
# Special handling on darwin for gcc 4.5 and 4.7

projects/gtkada_install_dynamic.gpr.in

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,24 @@
3232
project GtkAda_Install_Dynamic is
3333

3434
for Source_Dirs use (".");
35-
35+
for Languages use ("Ada", "C");
3636
for Library_Dir use "../../bin";
3737
for Library_ALI_Dir use "../../lib/gtkada/relocatable";
3838
for Library_Kind use "relocatable";
39-
for Library_Name use "gtkada-@PACKAGE_VERSION@";
40-
for Library_Options use ("-L.", "-L../../bin", "-L../../lib", "-L../../lib/gtkada/relocatable",
41-
"-lgtkada_c",
42-
"-lgtk-3",
43-
"-lgdk-3",
44-
"-latk-1.0",
45-
"-lgdk_pixbuf-2.0",
46-
"-ljpeg",
47-
"-lpng-3",
48-
"-lpangocairo-1.0",
49-
"-lgio-2.0",
50-
"-lcairo",
51-
"-lpangowin32-1.0",
52-
"-lgdi32",
53-
"-lpango-1.0",
54-
"-lgobject-2.0",
55-
"-lgmodule-2.0",
56-
"-lgthread-2.0",
57-
"-lgmodule-2.0",
58-
"-lglib-2.0",
59-
"-lintl",
60-
"-liconv",
61-
"-luser32");
62-
39+
for Library_Name use "gtkada";
40+
for Library_Options use ("-L.", "-L../../bin", "-L../../lib/gtkada/relocatable", @GTK_LIBS_GPR@);
41+
6342
package Compiler is
6443
for Default_Switches ("Ada") use ("-O2", "-gnat05");
44+
for Default_Switches ("C") use ("-O2",
45+
"-I../../include",
46+
"-I../../include/gtk-3.0",
47+
"-I../../include/glib-2.0",
48+
"-I../../lib/glib-2.0/include",
49+
"-I../../include/pango-1.0",
50+
"-I../../include/cairo",
51+
"-I../../include/gdk-pixbuf-2.0",
52+
"-I../../include/atk-1.0");
6553
end Compiler;
6654

6755
end GtkAda_Install_Dynamic;

0 commit comments

Comments
 (0)