aboutsummaryrefslogtreecommitdiff
path: root/tools/TexturePacker
diff options
context:
space:
mode:
authorCory Fields <theuni-nospam-@xbmc.org>2012-06-24 20:33:48 -0400
committerCory Fields <theuni-nospam-@xbmc.org>2012-08-08 18:59:20 -0400
commit981e2a26a927b04a16c229ea184a733dfc7cf4a1 (patch)
treee4e62f3e6cfeddb83b607d5ae5e85ccb4dc5efbd /tools/TexturePacker
parent7eeda36d1cadfcb93d9f25174633699f2dbda287 (diff)
[droid] add rpath to native libs
Otherwise we won't find our self-built libs at runtime. If this worked on linux before, it was purely coincidental. If it works on darwin, it must be because paths are embedded automatically there.
Diffstat (limited to 'tools/TexturePacker')
-rw-r--r--tools/TexturePacker/Makefile.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/TexturePacker/Makefile.in b/tools/TexturePacker/Makefile.in
index 482a6af087..840511c5dc 100644
--- a/tools/TexturePacker/Makefile.in
+++ b/tools/TexturePacker/Makefile.in
@@ -9,12 +9,15 @@ CXXFLAGS+= \
-I@abs_top_srcdir@/xbmc \
-I@abs_top_srcdir@/xbmc/linux
+RPATH=-Wl,-rpath=$(NATIVE_ROOT_PATH)/lib
+
ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
ifdef NATIVE_ROOT_PATH
ifeq ($(findstring osx,@ARCH@),osx)
DEFINES += -DTARGET_DARWIN
NATIVE_ARCH=$(shell echo $(CXXFLAGS) | grep x86_64 >/dev/null && echo -m64 || echo -m32)
+RPATH=
endif
CXXFLAGS+= -I$(NATIVE_ROOT_PATH)/include
LIBS += -L$(NATIVE_ROOT_PATH)/lib
@@ -42,7 +45,7 @@ all: $(TARGET)
ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
# TexturePacker run native on build system, build it with native tools
$(TARGET): $(SRCS)
- g++ $(DEFINES) $(NATIVE_ARCH) $(CXXFLAGS) $(SRCS) $(LIBS) -o $(TARGET)
+ g++ $(DEFINES) $(NATIVE_ARCH) $(CXXFLAGS) $(SRCS) $(LIBS) $(RPATH) -o $(TARGET)
clean:
rm -f $(TARGET)
else