mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
29146937fd
@ -87,6 +87,7 @@ Please note the [new prerequisits to compile Cocos2d-x v4 projects on different
|
|||||||
#### Windows
|
#### Windows
|
||||||
1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
|
1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
|
||||||
2. Install CMake via the [Windows installer package](https://cmake.org/download/).
|
2. Install CMake via the [Windows installer package](https://cmake.org/download/).
|
||||||
|
3. Install Python and make sure the `python.exe` is in your `PATH` environment variable. Python is required by cocos2d-x`s build system.
|
||||||
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
|
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
|
||||||
4. Run CMake GUI from the start menu
|
4. Run CMake GUI from the start menu
|
||||||
5. Click `Browse Source` and select the directory `spine-runtimes`
|
5. Click `Browse Source` and select the directory `spine-runtimes`
|
||||||
@ -98,6 +99,8 @@ Please note the [new prerequisits to compile Cocos2d-x v4 projects on different
|
|||||||
9. Right click the `spine-cocos2dx-example` project in the solution explorer and select `Set as Startup Project` from the context menu
|
9. Right click the `spine-cocos2dx-example` project in the solution explorer and select `Set as Startup Project` from the context menu
|
||||||
10. Click `Local Windows Debugger` to run the example
|
10. Click `Local Windows Debugger` to run the example
|
||||||
|
|
||||||
|
Make sure to build the example for Windows 32-bit!
|
||||||
|
|
||||||
#### macOS
|
#### macOS
|
||||||
1. Install [Xcode](https://developer.apple.com/xcode/)
|
1. Install [Xcode](https://developer.apple.com/xcode/)
|
||||||
2. Install [Homebrew](http://brew.sh/)
|
2. Install [Homebrew](http://brew.sh/)
|
||||||
|
|||||||
@ -29,6 +29,7 @@ set(APP_NAME spine-cocos2dx-example)
|
|||||||
|
|
||||||
project(${APP_NAME})
|
project(${APP_NAME})
|
||||||
set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Build editor support for spine" FORCE)
|
set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Build editor support for spine" FORCE)
|
||||||
|
set(BUILD_EXTENSIONS OFF CACHE BOOL "Build extensions" FORCE)
|
||||||
|
|
||||||
if(XCODE)
|
if(XCODE)
|
||||||
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
|
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
|
||||||
@ -152,9 +153,9 @@ if(APPLE)
|
|||||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||||
|
|
||||||
if(MACOSX)
|
if(MACOSX)
|
||||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
|
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
|
||||||
elseif(IOS)
|
elseif(IOS)
|
||||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -26,21 +26,23 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
set(APP_NAME MyGame)
|
set(APP_NAME spine-cocos2dx-example)
|
||||||
project (${APP_NAME})
|
project (${APP_NAME})
|
||||||
|
|
||||||
set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d)
|
set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${COCOS2D_ROOT}/cmake/Modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${COCOS2D_ROOT}/cmake/Modules/")
|
||||||
|
|
||||||
include(CocosConfigDefine)
|
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
|
||||||
include(CocosBuildHelpers)
|
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||||
|
|
||||||
# libcocos2d
|
# libcocos2d
|
||||||
set(BUILD_CPP_EMPTY_TEST OFF CACHE BOOL "turn off build cpp-empty-test")
|
set(BUILD_CPP_EMPTY_TEST OFF CACHE BOOL "turn off build cpp-empty-test" FORCE)
|
||||||
set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests")
|
set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests" FORCE)
|
||||||
set(BUILD_LUA_LIBS OFF CACHE BOOL "turn off build lua related targets")
|
set(BUILD_LUA_LIBS OFF CACHE BOOL "turn off build lua related targets" FORCE)
|
||||||
set(BUILD_JS_LIBS OFF CACHE BOOL "turn off build js related targets")
|
set(BUILD_JS_LIBS OFF CACHE BOOL "turn off build js related targets" FORCE)
|
||||||
|
|
||||||
|
set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Build editor support for spine" FORCE)
|
||||||
|
|
||||||
|
|
||||||
set(BUILD_EDITOR_SPINE ON CACHE BOOL "enable spine")
|
set(BUILD_EDITOR_SPINE ON CACHE BOOL "enable spine")
|
||||||
@ -50,52 +52,12 @@ include_directories(
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/../src
|
${CMAKE_CURRENT_LIST_DIR}/../src
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(${COCOS2D_ROOT})
|
include(CocosBuildSet)
|
||||||
|
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
|
||||||
|
|
||||||
get_target_property(COCOS2D_X_VERSION cocos2d VERSION)
|
get_target_property(COCOS2D_X_VERSION cocos2d VERSION)
|
||||||
set(COCOS2DX_ROOT_PATH ${COCOS2D_ROOT})
|
set(COCOS2DX_ROOT_PATH ${COCOS2D_ROOT})
|
||||||
|
|
||||||
# Some macro definitions
|
|
||||||
# if(WINDOWS)
|
|
||||||
# if(BUILD_SHARED_LIBS)
|
|
||||||
# ADD_DEFINITIONS (-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL)
|
|
||||||
# else()
|
|
||||||
# ADD_DEFINITIONS (-DCC_STATIC)
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
# ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
|
|
||||||
# set(PLATFORM_FOLDER win32)
|
|
||||||
# elseif(MACOSX OR APPLE)
|
|
||||||
# ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
|
|
||||||
# ADD_DEFINITIONS (-DUSE_FILE32API)
|
|
||||||
# set(PLATFORM_FOLDER mac)
|
|
||||||
# elseif(LINUX)
|
|
||||||
# ADD_DEFINITIONS(-DLINUX)
|
|
||||||
# set(PLATFORM_FOLDER linux)
|
|
||||||
# elseif(ANDROID)
|
|
||||||
# ADD_DEFINITIONS (-DUSE_FILE32API)
|
|
||||||
# set(PLATFORM_FOLDER android)
|
|
||||||
# else()
|
|
||||||
# message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler options
|
|
||||||
# if(MSVC)
|
|
||||||
# ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
|
|
||||||
# -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
|
|
||||||
# -wd4514 -wd4056 -wd4996 -wd4099)
|
|
||||||
# else()
|
|
||||||
# set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1")
|
|
||||||
# set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
|
||||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
|
|
||||||
# if(CLANG)
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
|
||||||
# endif()
|
|
||||||
# endif(MSVC)
|
|
||||||
|
|
||||||
|
|
||||||
set(PLATFORM_SPECIFIC_SRC)
|
set(PLATFORM_SPECIFIC_SRC)
|
||||||
set(PLATFORM_SPECIFIC_HEADERS)
|
set(PLATFORM_SPECIFIC_HEADERS)
|
||||||
set(cc_common_res)
|
set(cc_common_res)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user