From dac9be5016bc508f988e3f017264e58188682f14 Mon Sep 17 00:00:00 2001 From: Adrien de Sentenac Date: Thu, 22 Oct 2015 19:12:37 -0400 Subject: [PATCH] Various CMake improvements - Added c++_shared (LLVM) to Android toolchain options. Fixed AndroidNdkGdb.cmake. - Fixed includes when not using prebuilt libs. Added option to use sources in external when not using prebuilt libs. - Added option in CMake to be able build Box2D without using it as physics library in cocos2d-x (similar to what is done in the Visual Studio solution). --- CMakeLists.txt | 6 ++++ cmake/AndroidNdkGdb.cmake | 11 ++++--- cmake/Modules/BuildModules.cmake | 14 +++++---- cmake/Modules/CocosUsePrebuiltLibs.cmake | 2 -- cmake/Modules/SelectModule.cmake | 2 ++ cmake/Modules/SetCompilerOptions.cmake | 2 +- cmake/android.toolchain.cmake | 30 ++++++++++++++++--- cocos/CMakeLists.txt | 10 +++++++ cocos/base/CCValue.cpp | 6 ++-- .../ArmatureNodeReader/ArmatureNodeReader.cpp | 2 +- .../SkeletonReader/BoneNodeReader.cpp | 2 +- .../SkeletonReader/SkeletonNodeReader.cpp | 2 +- .../TabControlReader/TabControlReader.cpp | 2 +- cocos/platform/CMakeLists.txt | 6 ++++ .../Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp | 2 +- ...Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp | 2 +- cocos/ui/UIRichText.cpp | 2 +- .../lib/runtime/RuntimeCCSImpl.cpp | 2 +- 18 files changed, 75 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5be0e44a4b..a7f71a0a70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,11 @@ SelectModule() include(SetCompilerOptions) SetCompilerOptions() +if (CMAKE_FIND_ROOT_PATH AND USE_PREBUILT_LIBS) + # Adds cocos2d-x external folder to the list of valid include/library paths when cross-compiling and using prebuilds + set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${COCOS_EXTERNAL_DIR}) +endif () + include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cocos @@ -84,6 +89,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_CURRENT_SOURCE_DIR}/external ) + if(USE_PREBUILT_LIBS) include(CocosUsePrebuiltLibs) endif() diff --git a/cmake/AndroidNdkGdb.cmake b/cmake/AndroidNdkGdb.cmake index 0677dcda91..76d3869df6 100644 --- a/cmake/AndroidNdkGdb.cmake +++ b/cmake/AndroidNdkGdb.cmake @@ -43,7 +43,7 @@ # also create a mininal NDK skeleton so ndk-gdb finds the paths # # the optional parameter defines the path to the android project. -# uses PROJECT_SOURCE_DIR by default. +# uses PROJECT_BINARY_DIR by default. macro(android_ndk_gdb_enable) if(ANDROID) # create custom target that depends on the real target so it gets executed afterwards @@ -52,7 +52,7 @@ macro(android_ndk_gdb_enable) if(${ARGC}) set(ANDROID_PROJECT_DIR ${ARGV0}) else() - set(ANDROID_PROJECT_DIR ${PROJECT_SOURCE_DIR}) + set(ANDROID_PROJECT_DIR ${PROJECT_BINARY_DIR}) endif() set(NDK_GDB_SOLIB_PATH ${ANDROID_PROJECT_DIR}/obj/local/${ANDROID_NDK_ABI_NAME}/) @@ -75,6 +75,7 @@ macro(android_ndk_gdb_enable) # 3. copy gdbserver executable file(COPY ${ANDROID_NDK}/prebuilt/android-${ANDROID_ARCH_NAME}/gdbserver/gdbserver DESTINATION ${LIBRARY_OUTPUT_PATH}) + file(RENAME ${LIBRARY_OUTPUT_PATH}/gdbserver ${LIBRARY_OUTPUT_PATH}/gdbserver.so) endif() endmacro() @@ -82,15 +83,13 @@ endmacro() # copies the debug version to NDK_GDB_SOLIB_PATH then strips symbols of original macro(android_ndk_gdb_debuggable TARGET_NAME) if(ANDROID) - get_property(TARGET_LOCATION TARGET ${TARGET_NAME} PROPERTY LOCATION) - # create custom target that depends on the real target so it gets executed afterwards add_dependencies(NDK_GDB ${TARGET_NAME}) # 4. copy lib to obj - add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${TARGET_LOCATION} ${NDK_GDB_SOLIB_PATH}) + add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${NDK_GDB_SOLIB_PATH}) # 5. strip symbols - add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_STRIP} ${TARGET_LOCATION}) + add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_STRIP} $) endif() endmacro() diff --git a/cmake/Modules/BuildModules.cmake b/cmake/Modules/BuildModules.cmake index ab5a2469a3..7033148b11 100644 --- a/cmake/Modules/BuildModules.cmake +++ b/cmake/Modules/BuildModules.cmake @@ -48,7 +48,7 @@ macro (BuildModules) # Box2d (not prebuilded, exists as source) if(USE_BOX2D) - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/Box2D) set(Box2D_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/include) set(Box2D_LIBRARIES box2d) @@ -58,11 +58,13 @@ macro (BuildModules) set(Box2D_LIBRARIES Box2D) endif() message(STATUS "Box2D include dirs: ${Box2D_INCLUDE_DIRS}") + elseif(BUILD_BOX2D) + add_subdirectory(external/Box2D) endif(USE_BOX2D) # Bullet (not prebuilded, exists as source) if(USE_BULLET) - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/bullet) set(BULLET_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet) set(BULLET_LIBRARIES bullet) @@ -75,7 +77,7 @@ macro (BuildModules) # Recast (not prebuilded, exists as source) if(USE_RECAST) - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/recast) set(RECAST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/recast) set(RECAST_LIBRARIES recast) @@ -87,7 +89,7 @@ macro (BuildModules) endif(USE_RECAST) # Tinyxml2 (not prebuilded, exists as source) - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/tinyxml2) set(TinyXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2) set(TinyXML2_LIBRARIES tinyxml2) @@ -129,7 +131,7 @@ macro (BuildModules) cocos_find_package(CURL CURL REQUIRED) # flatbuffers - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/flatbuffers) set(FLATBUFFERS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external) message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}") @@ -138,7 +140,7 @@ macro (BuildModules) endif() # xxhash - if(USE_PREBUILT_LIBS) + if(USE_PREBUILT_LIBS OR USE_SOURCES_EXTERNAL) add_subdirectory(external/xxhash) set(XXHASH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/xxhash) set(XXHASH_LIBRARIES xxhash) diff --git a/cmake/Modules/CocosUsePrebuiltLibs.cmake b/cmake/Modules/CocosUsePrebuiltLibs.cmake index b6af42490e..b30fb16fa6 100644 --- a/cmake/Modules/CocosUsePrebuiltLibs.cmake +++ b/cmake/Modules/CocosUsePrebuiltLibs.cmake @@ -128,7 +128,6 @@ foreach(_lib ${all_prebuilt_libs}) endif() foreach(_inc_name ${_${_lib}_inc}) unset(_inc_tmp CACHE) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) find_path(_inc_tmp ${_inc_name} PATH_SUFFIXES ${_suffixes} PATHS ${_dir} NO_DEFAULT_PATH) if(_inc_tmp) list(APPEND include_dirs ${_inc_tmp}) @@ -156,7 +155,6 @@ foreach(_lib ${all_prebuilt_libs}) # find all libs foreach(_lib_name ${_${_lib}_libs}) unset(_lib_tmp CACHE) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) find_library(_lib_tmp ${_lib_name} PATHS ${_dir} NO_DEFAULT_PATH) if(_lib_tmp) list(APPEND libs ${_lib_tmp}) diff --git a/cmake/Modules/SelectModule.cmake b/cmake/Modules/SelectModule.cmake index e76cf4725a..7b6dc1b6a0 100644 --- a/cmake/Modules/SelectModule.cmake +++ b/cmake/Modules/SelectModule.cmake @@ -36,6 +36,7 @@ macro (SelectModule) option(BUILD_EDITOR_SPINE "Build editor support for spine" ON) option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON) option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON) + option(BUILD_BOX2D "Build box2d external without using it for physics library" OFF) option(BUILD_CPP_TESTS "Build TestCpp samples" ${BUILD_CPP_TESTS_DEFAULT}) option(BUILD_CPP_EMPTY_TEST "Build TestCpp samples" ${BUILD_CPP_EMPTY_TEST_DEFAULT}) option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT}) @@ -43,6 +44,7 @@ macro (SelectModule) option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT}) option(BUILD_JS_TESTS "Build TestJS samples" ${BUILD_JS_TESTS_DEFAULT}) option(USE_PREBUILT_LIBS "Use prebuilt libraries in external directory" ${USE_PREBUILT_LIBS_DEFAULT}) + option(USE_SOURCES_EXTERNAL "Use sources in external directory (automatically ON when USE_PREBUILT_LIBS is ON)" OFF) if(USE_PREBUILT_LIBS AND MINGW) message(FATAL_ERROR "Prebuilt windows libs can't be used with mingw, please use packages.") diff --git a/cmake/Modules/SetCompilerOptions.cmake b/cmake/Modules/SetCompilerOptions.cmake index c8fa020da6..54c59d1c82 100644 --- a/cmake/Modules/SetCompilerOptions.cmake +++ b/cmake/Modules/SetCompilerOptions.cmake @@ -97,7 +97,7 @@ macro (SetCompilerOptions) endif() endif() - if (MINGW OR NOT USE_PREBUILT_LIBS) + if (MINGW AND NOT USE_PREBUILT_LIBS) add_definitions(-DMINIZIP_FROM_SYSTEM) endif() diff --git a/cmake/android.toolchain.cmake b/cmake/android.toolchain.cmake index a9bd660643..41b3127fd6 100644 --- a/cmake/android.toolchain.cmake +++ b/cmake/android.toolchain.cmake @@ -154,6 +154,10 @@ # Implies -frtti -fno-exceptions. # Available for NDK r7b and newer. # Silently degrades to gnustl_static if not available. +# c++_shared -> Use the LLVM libc++ runtime as a shared library. +# Implies -std=c++11. +# Available for NDK r7b and newer. +# Is not available for standalone toolchain. # # ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on # chosen runtime. If disabled, then the user is responsible for settings @@ -833,7 +837,7 @@ set( ANDROID_STL_FORCE_FEATURES ON CACHE BOOL "automatically configure rtti and mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES ) if( BUILD_WITH_ANDROID_NDK ) - if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$") + if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared|c\\+\\+_shared)$") message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\". The possible values are: none -> Do not configure the runtime. @@ -845,6 +849,7 @@ The possible values are: stlport_shared -> Use the STLport runtime as a shared library. gnustl_static -> (default) Use the GNU STL as a static library. gnustl_shared -> Use the GNU STL as a shared library. + c++_shared -> Use the LLVM libc++ as a shared library. " ) endif() elseif( BUILD_WITH_STANDALONE_TOOLCHAIN ) @@ -891,7 +896,6 @@ See https://android.googlesource.com/platform/development.git f907f4f9d4e56ccc80 " ) endif() - # setup paths and STL for standalone toolchain if( BUILD_WITH_STANDALONE_TOOLCHAIN ) set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) @@ -1026,6 +1030,24 @@ if( BUILD_WITH_ANDROID_NDK ) else() set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" ) endif() + elseif( ANDROID_STL MATCHES "c\\+\\+_shared" ) + set( ANDROID_EXCEPTIONS ON ) + set( ANDROID_RTTI ON ) + set( ANDROID_CXX_ROOT "${ANDROID_NDK}/sources/cxx-stl/" ) + set( ANDROID_LLVM_ROOT "${ANDROID_CXX_ROOT}/llvm-libc++" ) + if( X86 ) + set( ANDROID_ABI_INCLUDE_DIRS "${ANDROID_CXX_ROOT}/gabi++/include" ) + else() + set( ANDROID_ABI_INCLUDE_DIRS "${ANDROID_CXX_ROOT}/llvm-libc++abi/libcxxabi/include" ) + endif() + set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources" "${ANDROID_LLVM_ROOT}/libcxx/include" "${ANDROID_ABI_INCLUDE_DIRS}" ) + # android support files + include_directories ( SYSTEM ${ANDROID_NDK}/sources/android/support/include ) + if( EXISTS "${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_shared.so" ) + set( __libstl "${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_shared.so" ) + else() + message( "c++ shared library doesn't exist" ) + endif() else() message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" ) endif() @@ -1448,7 +1470,7 @@ if( DEFINED ANDROID_EXCEPTIONS AND ANDROID_STL_FORCE_FEATURES ) endif() # global includes and link directories -include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} ) +include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" "${ANDROID_SYSROOT}/usr/include/machine" ${ANDROID_STL_INCLUDE_DIRS} ) get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning link_directories( "${__android_install_path}" ) @@ -1628,7 +1650,7 @@ endif() # Variables controlling behavior or set by cmake toolchain: # ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64" # ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14,15,16,17,18,19,21 (depends on NDK version) -# ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none +# ANDROID_STL : c++_shared/gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none # ANDROID_FORBID_SYGWIN : ON/OFF # ANDROID_NO_UNDEFINED : ON/OFF # ANDROID_SO_UNDEFINED : OFF/ON (default depends on NDK version) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index b86c67a547..ed474990d9 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -88,12 +88,22 @@ set(COCOS_SRC cocos2d.cpp add_library(cocos2dInternal ${COCOS_SRC}) +set_target_properties(cocos2dInternal + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + VERSION "${COCOS2D_X_VERSION}" +) + set(PLATFORM_SPECIFIC_LIBS) if(WINDOWS) foreach(_pkg OPENGL GLEW GLFW3 VORBIS MPG123 OPENAL) cocos_use_pkg(cocos2dInternal ${_pkg}) endforeach() list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 winmm) + if(MINGW) + list(APPEND PLATFORM_SPECIFIC_LIBS shlwapi version) + endif() elseif(LINUX) foreach(_pkg OPENGL GLEW GLFW3 FMOD FONTCONFIG THREADS GTK3) cocos_use_pkg(cocos2dInternal ${_pkg}) diff --git a/cocos/base/CCValue.cpp b/cocos/base/CCValue.cpp index 596fcf2c71..29731453b7 100644 --- a/cocos/base/CCValue.cpp +++ b/cocos/base/CCValue.cpp @@ -29,9 +29,9 @@ NS_CC_BEGIN -CC_DLL const ValueVector ValueVectorNull; -CC_DLL const ValueMap ValueMapNull; -CC_DLL const ValueMapIntKey ValueMapIntKeyNull; +const ValueVector ValueVectorNull; +const ValueMap ValueMapNull; +const ValueMapIntKey ValueMapIntKeyNull; const Value Value::Null; diff --git a/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp index cf44d3f0ef..2f41f76a9c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp @@ -1,7 +1,7 @@ #include "editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.h" #include "platform/CCFileUtils.h" -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" #include "flatbuffers/flatbuffers.h" #include "editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" diff --git a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp index 63de57524d..4f1cc683b4 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/BoneNodeReader.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" #include "flatbuffers/flatbuffers.h" #include "editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" diff --git a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/SkeletonNodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/SkeletonNodeReader.cpp index a083937d93..a7d924f506 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/SkeletonNodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SkeletonReader/SkeletonNodeReader.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" #include "flatbuffers/flatbuffers.h" #include "editor-support/cocostudio/WidgetReader/SkeletonReader/CSBoneBinary_generated.h" #include "editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.h" diff --git a/cocos/editor-support/cocostudio/WidgetReader/TabControlReader/TabControlReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TabControlReader/TabControlReader.cpp index 350154ccdb..2a9904af02 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TabControlReader/TabControlReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TabControlReader/TabControlReader.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" #include "flatbuffers/flatbuffers.h" #include "editor-support/cocostudio/WidgetReader/WidgetReader.h" #include "editor-support/cocostudio/CSParseBinary_generated.h" diff --git a/cocos/platform/CMakeLists.txt b/cocos/platform/CMakeLists.txt index f7dcaac174..9e8be55a11 100644 --- a/cocos/platform/CMakeLists.txt +++ b/cocos/platform/CMakeLists.txt @@ -87,6 +87,12 @@ set(COCOS2DX_ANDROID_STATIC add_library(cocos2dxandroid_static STATIC ${COCOS2DX_ANDROID_STATIC}) set_property(TARGET cocos2dxandroid_static PROPERTY POSITION_INDEPENDENT_CODE TRUE) +set_target_properties(cocos2dxandroid_static + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + VERSION "${COCOS2D_X_VERSION}" +) endif() diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp index 564f824f27..c9663ef686 100644 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp +++ b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "platform/android/jni/JniHelper.h" #include #include "base/CCDirector.h" -#include "../CCApplication.h" +#include "platform/CCApplication.h" #include "platform/CCFileUtils.h" #include "base/ccUTF8.h" diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp index 685d92052f..6e0a4326bf 100644 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp +++ b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp @@ -3,7 +3,7 @@ #include "base/CCEventType.h" #include "base/CCEventCustom.h" #include "base/CCEventDispatcher.h" -#include "../CCApplication.h" +#include "platform/CCApplication.h" #include "platform/CCFileUtils.h" #include "platform/android/jni/JniHelper.h" #include diff --git a/cocos/ui/UIRichText.cpp b/cocos/ui/UIRichText.cpp index 7d213a4305..8203050b29 100644 --- a/cocos/ui/UIRichText.cpp +++ b/cocos/ui/UIRichText.cpp @@ -28,7 +28,7 @@ #include #include -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" #include "platform/CCFileUtils.h" #include "platform/CCApplication.h" #include "base/CCEventListenerTouch.h" diff --git a/tools/simulator/libsimulator/lib/runtime/RuntimeCCSImpl.cpp b/tools/simulator/libsimulator/lib/runtime/RuntimeCCSImpl.cpp index 49f3f64c61..bac603a56f 100644 --- a/tools/simulator/libsimulator/lib/runtime/RuntimeCCSImpl.cpp +++ b/tools/simulator/libsimulator/lib/runtime/RuntimeCCSImpl.cpp @@ -3,7 +3,7 @@ #include "ConfigParser.h" #include "cocostudio/CocoStudio.h" #include "ui/UIHelper.h" -#include "tinyxml2/tinyxml2.h" +#include "tinyxml2.h" ////////////////////////////////////////