Skip to content

Instantly share code, notes, and snippets.

@ando-takahiro
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save ando-takahiro/28033ae1ad87a05029ea to your computer and use it in GitHub Desktop.

Select an option

Save ando-takahiro/28033ae1ad87a05029ea to your computer and use it in GitHub Desktop.
what I did to build libuv with cocos2d-x(3.0series)

iOS

  • $ ./gyp_uv.py -f xcode
  • make project from the generated xcodeproj

reference: libuv/libuv#137

Android

$APP_PROJ means a directory where you generate with cocos command.

  • apply this @eddyb's patch to build .a on mac
  • put .a in $APP_PROJ/proj.android/jni
  • modify $APP_PROJ/proj.android/jni/Application.mk
LOCAL_PATH := $(call my-dir)

APP_STL := c++_static
NDK_TOOLCHAIN_VERSION=clang

APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic -L$(LOCAL_PATH) -luv
  • $ cocos run -p android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment