On Wed, Apr 10, 2013 at 1:07 PM, Andy Spencer <andy753...@gmail.com> wrote:
> On 2013-04-10 15:03, Marc-André Lureau wrote: > > Also projects not using pkg-config have the same problems. Doing a > > grep under fedora-mingw sys-root reveals that there are many binaries > > that refer to hardcoded path too. > > I have this problem running my software on windows. I have many places > in my Makefile.am's where I use something like: > > myfile_CPPFLAGS = -DPKGDATADIR="\"$(pkgdatadir)\"" > > Which results in a non-relocatable build. It seems like most of my > issues with relative build could fixed by patching ./configure to > support './configure --prefix=..'. > > Has anyone tried this, or are there better solutions? My current > solution is basically to emulate with some autoconf hacks. > applications should not assume that DATADIR or other run-time located resources are found by using compile time values. GTK makes this mistake on Linux and OS X although I have submitted an initial patch to fix it and eventually unify with windows, where this mistake is not made. currently it seems unlikely that this patch will gain enough support to go in, but you never know. to be relocatable, your app should *fall back* on -DPKGDATADIR but should first try checking for an environment variable and then a path relative to the executable. --p
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list