Issue
i'm trying to build a shared library i can distribute. This File should roughly have the form of an Apple *.framework file. What's important with that is that all headers i mention in the "LOCAL_C_INCLUDES" variable are exported (copied) to a certain location. Finally i want my library file to look like this:
LIB_ROOT/
myLib.so
include/
header1.hpp
header2.hpp
I can't find an easy method to do this with the NDK build. Sure i could try to pass my Application LOCAL_C_INCLUDES variables and glob all the header files but that looks pretty ugly. I figures other people must have solved this problem. How did you do?
The only thing i could find on the internet was this line:
LOCAL_EXPORT_C_INCLUDES = $(LOCAL_PATH)/include
in the Android.mk file, which does roughly nothing at all. What can i do?
Solution
I ended up using this script at the end of my makefile to manually copy headers in my directory:
all: $(PROJECT_PATH)/include/$(notdir $(LOCAL_BUILT_MODULE))
$(PROJECT_PATH)/include/$(notdir $(LOCAL_BUILT_MODULE)): $(LOCAL_BUILT_MODULE) mkdir -p $(PROJECT_PATH)/include cp $< $@ cp $(LOCAL_COPY_HEADERS) $(PROJECT_PATH)/include
Answered By - Geki
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.