cocos2dx3.2 android.mk的标准配置,说笑呢

前端之家收集整理的这篇文章主要介绍了cocos2dx3.2 android.mk的标准配置,说笑呢前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

说标准那是因为我用它能成功编译出我的android游戏仅此而已,哈哈

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)


LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp


MY_CPP_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/hellocpp/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/json/*.cpp) //这里添加的jsoncpp 第三方库

而下面这条是添加cocos2dx3.2自身带的json库

#MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/../../cocos2d/cocos/external/json/*.cpp)




LOCAL_SRC_FILES := $(MY_CPP_LIST:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes


LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static

# LOCAL_WHOLE_STATIC_LIBRARIES += Box2d_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static
# LOCAL_WHOLE_STATIC_LIBRARIES += spine_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static

include $(BUILD_SHARED_LIBRARY)

$(call import-module,.)
$(call import-module,audio/android)
# $(call import-module,Box2D)
# $(call import-module,editor-support/cocosbuilder)
# $(call import-module,editor-support/spine)
$(call import-module,editor-support/cocostudio)
# $(call import-module,network)
# $(call import-module,extensions)




注意类以上的#是注释的意思,记得有次很久不懂这鸟东西,害得我好苦

添加json库的时候,在编译android的时候记得加入 .ccp文件饿

关于json方面的android请参考:

http://www.jb51.cc/article/p-goadnqct-eg.html

原文链接:https://www.f2er.com/cocos2dx/345347.html

猜你在找的Cocos2d-x相关文章