Reputation: 2447
I was able to cross compile Freetype2 for android using this guide: https://bitbucket.org/javafxports/android/wiki/Building%20Freetype. How do now include it in my project? Do I need to redo it with a modified step, or what?
Upvotes: 1
Views: 170
Reputation: 2447
I just wanted to post this in case someone else has the same problems as me.
I found this tutorial: https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Android_NDK#FreeType
and followed it. Then I copied the freetype
folder created to my jni
folder in my project. I then modified the Android.mk
file in the freetype folder to be this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := freetype
LOCAL_SRC_FILES := lib/libfreetype.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/freetyp2 \
$(LOCAL_PATH)/include/freetype2/freetype \
$(LOCAL_PATH)/include/freetype2/freetype/config
include $(PREBUILT_STATIC_LIBRARY)
and my local Android.mk
file to have this:
LOCAL_C_INCLUDES := freetype/include/freetype2/ \
freetype/include/freetype2/freetype \
freetype/include/freetype2/freetype/config
LOCAL_STATIC_LIBRARIES := freetype
Took a while, but it finally works!
Upvotes: 2