Was able to cross compile Freetype2, now what?

本小妞迷上赌 提交于 2019-12-13 02:16:53

问题


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?


回答1:


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!



来源:https://stackoverflow.com/questions/37952632/was-able-to-cross-compile-freetype2-now-what

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!