зеркало из https://github.com/microsoft/cocos2d-x.git
Merge pull request #7981 from ricardoquesada/cmakefile_for_mac
Squashed commit of the following:
This commit is contained in:
Коммит
81fa462f3d
|
@ -27,8 +27,8 @@ cmake_minimum_required(VERSION 2.8)
|
|||
project (Cocos2dx)
|
||||
|
||||
# The version number
|
||||
set(Cocos2dxSamples_VERSION_MAJOR 3)
|
||||
set(Cocos2dxSamples_VERSION_MINOR 1)
|
||||
set(COCOS2D_X_VERSION 3.3.0)
|
||||
#set(CMAKE_C_COMPILER_INIT g++)
|
||||
|
||||
include(build/BuildHelpers.CMakeLists.txt)
|
||||
|
||||
|
@ -58,10 +58,14 @@ if(WINDOWS)
|
|||
ADD_DEFINITIONS (-D_USRDLL -DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32)
|
||||
set(PLATFORM_FOLDER win32)
|
||||
elseif(MACOSX)
|
||||
ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
|
||||
ADD_DEFINITIONS (-DUSE_FILE32API)
|
||||
set(PLATFORM_FOLDER mac)
|
||||
else(LINUX)
|
||||
elseif(LINUX)
|
||||
ADD_DEFINITIONS(-DLINUX)
|
||||
set(PLATFORM_FOLDER linux)
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
|
@ -78,15 +82,28 @@ endif()
|
|||
|
||||
# architecture
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set(ARCH_DIR "64-bit")
|
||||
set(ARCH_DIR "64-bit")
|
||||
elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(ARCH_DIR "32-bit")
|
||||
else()
|
||||
set(ARCH_DIR "32-bit")
|
||||
message( FATAL_ERROR "Unsupported architecture, CMake will exit" )
|
||||
endif()
|
||||
|
||||
# Specific Include Directories
|
||||
if(LINUX)
|
||||
set(PLATFORM_INCLUDE_DIR
|
||||
/usr/include
|
||||
/usr/include/GLFW
|
||||
/usr/local/include/GLFW
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_INCLUDE_DIR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/include/${PLATFORM_FOLDER}
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
/usr/include
|
||||
/usr/include/GLFW
|
||||
/usr/local/include/GLFW
|
||||
${PLATFORM_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform/${PLATFORM_FOLDER}
|
||||
|
@ -94,15 +111,32 @@ include_directories(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/external
|
||||
)
|
||||
|
||||
# Specific Link Directories
|
||||
if(LINUX)
|
||||
set(PLATFORM_LINK_DIR
|
||||
/usr/local/lib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
|
||||
)
|
||||
set(PLATFORM_FOLDER_ARCH
|
||||
${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_FOLDER_ARCH
|
||||
${PLATFORM_FOLDER}
|
||||
)
|
||||
set(PLATFORM_LINK_DIR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
)
|
||||
endif()
|
||||
|
||||
link_directories(
|
||||
/usr/local/lib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
|
||||
${PLATFORM_LINK_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER_ARCH}
|
||||
)
|
||||
|
||||
# libcocos2d.a
|
||||
|
|
|
@ -1818,6 +1818,17 @@
|
|||
50ABC0651926664800A911A9 /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF531926664700A911A9 /* CCGL.h */; };
|
||||
50ABC0671926664800A911A9 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF541926664700A911A9 /* CCPlatformDefine.h */; };
|
||||
50ABC0691926664800A911A9 /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF551926664700A911A9 /* CCStdC.h */; };
|
||||
50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176631960F89B00DE83F5 /* CCEventListenerController.cpp */; };
|
||||
50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; };
|
||||
50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */; };
|
||||
50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; };
|
||||
50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; };
|
||||
50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; };
|
||||
50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; };
|
||||
50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; };
|
||||
50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; };
|
||||
50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; };
|
||||
50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; };
|
||||
A07A4CAF1783777C0073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551A342158F2AB200E66CFE /* Foundation.framework */; };
|
||||
B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; };
|
||||
B217703C1977ECB4009EE11B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B217703B1977ECB4009EE11B /* IOKit.framework */; };
|
||||
|
@ -2830,6 +2841,10 @@
|
|||
50E6D33118E174130051CA34 /* UIRelativeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRelativeBox.h; sourceTree = "<group>"; };
|
||||
50E6D33218E174130051CA34 /* UIVBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVBox.cpp; sourceTree = "<group>"; };
|
||||
50E6D33318E174130051CA34 /* UIVBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVBox.h; sourceTree = "<group>"; };
|
||||
50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWin.h; sourceTree = "<group>"; };
|
||||
50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWp8.h; sourceTree = "<group>"; };
|
||||
50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWin.cpp; sourceTree = "<group>"; };
|
||||
50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWp8.cpp; sourceTree = "<group>"; };
|
||||
50FCEB6A18C72017004AD434 /* ButtonReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonReader.cpp; sourceTree = "<group>"; };
|
||||
50FCEB6B18C72017004AD434 /* ButtonReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonReader.h; sourceTree = "<group>"; };
|
||||
50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckBoxReader.cpp; sourceTree = "<group>"; };
|
||||
|
@ -3996,6 +4011,10 @@
|
|||
292DB12E19B4574100A80320 /* UIEditBox */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */,
|
||||
50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */,
|
||||
50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */,
|
||||
50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */,
|
||||
292DB12F19B4574100A80320 /* UIEditBox.cpp */,
|
||||
292DB13019B4574100A80320 /* UIEditBox.h */,
|
||||
292DB13119B4574100A80320 /* UIEditBoxImpl.h */,
|
||||
|
@ -5034,6 +5053,7 @@
|
|||
1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */,
|
||||
50ABBD911925AB4100A911A9 /* CCGLProgramCache.h in Headers */,
|
||||
15AE180619AAD2F700C27E9E /* 3dExport.h in Headers */,
|
||||
50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */,
|
||||
15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */,
|
||||
15AE1A8F19AAD40300C27E9E /* b2RopeJoint.h in Headers */,
|
||||
15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */,
|
||||
|
@ -5070,6 +5090,7 @@
|
|||
15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */,
|
||||
15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */,
|
||||
1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */,
|
||||
50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */,
|
||||
15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */,
|
||||
1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */,
|
||||
5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */,
|
||||
|
@ -5095,6 +5116,7 @@
|
|||
5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */,
|
||||
15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */,
|
||||
15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */,
|
||||
50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */,
|
||||
15AE197119AAD35700C27E9E /* CCFrame.h in Headers */,
|
||||
15AE1A6519AAD40300C27E9E /* b2TimeStep.h in Headers */,
|
||||
15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */,
|
||||
|
@ -5600,6 +5622,7 @@
|
|||
15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */,
|
||||
B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */,
|
||||
15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */,
|
||||
50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */,
|
||||
15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */,
|
||||
50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */,
|
||||
3EA3EDBF1991CDFA00645534 /* CCCamera.h in Headers */,
|
||||
|
@ -5800,6 +5823,7 @@
|
|||
15AE1A9519AAD40300C27E9E /* b2BlockAllocator.h in Headers */,
|
||||
5034CA48191D591100CE6051 /* ccShader_Label_normal.frag in Headers */,
|
||||
15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */,
|
||||
50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */,
|
||||
50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */,
|
||||
15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */,
|
||||
503DD8E81926736A00CD74DD /* CCES2Renderer.h in Headers */,
|
||||
|
@ -6129,8 +6153,10 @@
|
|||
1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */,
|
||||
1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */,
|
||||
15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */,
|
||||
50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */,
|
||||
B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */,
|
||||
15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */,
|
||||
50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */,
|
||||
15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */,
|
||||
15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */,
|
||||
50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */,
|
||||
|
@ -6363,6 +6389,7 @@
|
|||
15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */,
|
||||
292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */,
|
||||
15AE1A5219AAD40300C27E9E /* b2Draw.cpp in Sources */,
|
||||
50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */,
|
||||
50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */,
|
||||
1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */,
|
||||
1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */,
|
||||
|
@ -6435,6 +6462,7 @@
|
|||
15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */,
|
||||
15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */,
|
||||
15AE19EA19AAD3A700C27E9E /* SlotData.cpp in Sources */,
|
||||
50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */,
|
||||
15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */,
|
||||
1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */,
|
||||
50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */,
|
||||
|
@ -6657,6 +6685,7 @@
|
|||
15AE1A0B19AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */,
|
||||
15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */,
|
||||
15AE1AA519AAD40300C27E9E /* b2Fixture.cpp in Sources */,
|
||||
50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */,
|
||||
15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */,
|
||||
B375107E1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp in Sources */,
|
||||
15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */,
|
||||
|
@ -6841,6 +6870,7 @@
|
|||
15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */,
|
||||
15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */,
|
||||
1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */,
|
||||
50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */,
|
||||
15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */,
|
||||
15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */,
|
||||
15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */,
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
set(COCOS_3D_SRC
|
||||
CCRay.cpp
|
||||
CCAABB.cpp
|
||||
CCOBB.cpp
|
||||
CCAnimate3D.cpp
|
||||
CCAnimation3D.cpp
|
||||
CCAttachNode.cpp
|
||||
CCBundle3D.cpp
|
||||
CCBundleReader.cpp
|
||||
CCMesh.cpp
|
||||
CCMeshSkin.cpp
|
||||
CCMeshVertexIndexData.cpp
|
||||
CCSprite3DMaterial.cpp
|
||||
CCObjLoader.cpp
|
||||
CCSkeleton3D.cpp
|
||||
CCSprite3D.cpp
|
||||
)
|
||||
|
||||
|
||||
include_directories(
|
||||
3d
|
||||
)
|
||||
|
||||
add_library(cocos3d STATIC
|
||||
${COCOS_3D_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(cocos3d
|
||||
cocos2d
|
||||
)
|
||||
|
||||
set_target_properties(cocos3d
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
|
@ -25,18 +25,7 @@
|
|||
#ifndef __COCOS_3D_COCOS3D_H__
|
||||
#define __COCOS_3D_COCOS3D_H__
|
||||
|
||||
//3d
|
||||
#include "3d/CCAABB.h"
|
||||
#include "3d/CCOBB.h"
|
||||
#include "3d/CCRay.h"
|
||||
#include "3d/CCSprite3D.h"
|
||||
#include "3d/CCMesh.h"
|
||||
#include "3d/CCMeshSkin.h"
|
||||
#include "3d/CCAnimate3D.h"
|
||||
#include "3d/CCAnimation3D.h"
|
||||
#include "3d/CCSprite3DMaterial.h"
|
||||
#include "3d/CCAttachNode.h"
|
||||
#include "3d/CCMeshVertexIndexData.h"
|
||||
#include "3d/CCSkeleton3D.h"
|
||||
// DON'T ADD FILES HERE
|
||||
// ADD THEM IN THE COCOS2D.H HEADER FILE
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,69 +42,604 @@ include_directories(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/../external/websockets/include/${PLATFORM_FOLDER}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/linux-specific/fmod/include/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../external/${PLATFORM_FOLDER}-specific/fmod/include/${ARCH_DIR}
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# cocos2d source files and header files
|
||||
file(GLOB core_source_files
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cocos2d.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/ccFPSImages.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/2d/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/3d/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/audio/linux/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/deprecated/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocosbuilder/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/editor-support/spine/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/math/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/network/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/physics/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/physics/chipmunk/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/platform/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/platform/linux/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/platform/desktop/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/renderer/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/tinyxml2/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash/*.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/unzip/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/*.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/constraints/*.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/edtaa3func/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.c"
|
||||
)
|
||||
file(GLOB_RECURSE cocostudio_source_files "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/*.cpp")
|
||||
file(GLOB_RECURSE extensions_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/*.cpp")
|
||||
file(GLOB_RECURSE box2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../external/Box2D/*.cpp")
|
||||
set(cocos2d_source_files ${chipmunk_source_files} ${box2d_source_files} ${core_source_files} ${cocostudio_source_files} ${extensions_source_files})
|
||||
# exclude files specific for other platforms
|
||||
list(REMOVE_ITEM cocos2d_source_files
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebView.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebViewImpl_android.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/proj.wp8/pch.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../extensions/proj.wp8/pch.cpp")
|
||||
#
|
||||
# From CMake page:
|
||||
# We do not recommend using GLOB to collect a list of source files from your source tree.
|
||||
# If no CMakeLists.txt file changes when a source is added or removed then the generated
|
||||
# build system cannot know when to ask CMake to regenerate.)
|
||||
|
||||
add_library(cocos2d STATIC ${cocos2d_source_files})
|
||||
set(COCOS2D_BASE_SRC
|
||||
|
||||
cocos2d.cpp
|
||||
|
||||
base/ccFPSImages.c
|
||||
base/CCAutoreleasePool.cpp
|
||||
base/CCCamera.cpp
|
||||
base/CCConfiguration.cpp
|
||||
base/CCConsole.cpp
|
||||
base/CCController-android.cpp
|
||||
base/CCController.cpp
|
||||
base/CCData.cpp
|
||||
base/CCDataVisitor.cpp
|
||||
base/CCDirector.cpp
|
||||
base/CCEvent.cpp
|
||||
base/CCEventAcceleration.cpp
|
||||
base/CCEventController.cpp
|
||||
base/CCEventCustom.cpp
|
||||
base/CCEventDispatcher.cpp
|
||||
base/CCEventFocus.cpp
|
||||
base/CCEventKeyboard.cpp
|
||||
base/CCEventListener.cpp
|
||||
base/CCEventListenerAcceleration.cpp
|
||||
base/CCEventListenerController.cpp
|
||||
base/CCEventListenerCustom.cpp
|
||||
base/CCEventListenerFocus.cpp
|
||||
base/CCEventListenerKeyboard.cpp
|
||||
base/CCEventListenerMouse.cpp
|
||||
base/CCEventListenerTouch.cpp
|
||||
base/CCEventMouse.cpp
|
||||
base/CCEventTouch.cpp
|
||||
base/CCIMEDispatcher.cpp
|
||||
base/CCNS.cpp
|
||||
base/CCProfiling.cpp
|
||||
base/CCRef.cpp
|
||||
base/CCScheduler.cpp
|
||||
base/CCScriptSupport.cpp
|
||||
base/CCTouch.cpp
|
||||
base/CCUserDefault.cpp
|
||||
base/CCUserDefaultAndroid.cpp
|
||||
base/CCValue.cpp
|
||||
base/ObjectFactory.cpp
|
||||
base/TGAlib.cpp
|
||||
base/ZipUtils.cpp
|
||||
base/atitc.cpp
|
||||
base/base64.cpp
|
||||
base/ccCArray.cpp
|
||||
base/ccRandom.cpp
|
||||
base/ccTypes.cpp
|
||||
base/ccUTF8.cpp
|
||||
base/ccUtils.cpp
|
||||
base/etc1.cpp
|
||||
base/pvr.cpp
|
||||
base/s3tc.cpp
|
||||
|
||||
2d/CCAction.cpp
|
||||
2d/CCActionCamera.cpp
|
||||
2d/CCActionCatmullRom.cpp
|
||||
2d/CCActionEase.cpp
|
||||
2d/CCActionGrid.cpp
|
||||
2d/CCActionGrid3D.cpp
|
||||
2d/CCActionInstant.cpp
|
||||
2d/CCActionInterval.cpp
|
||||
2d/CCActionManager.cpp
|
||||
2d/CCActionPageTurn3D.cpp
|
||||
2d/CCActionProgressTimer.cpp
|
||||
2d/CCActionTiledGrid.cpp
|
||||
2d/CCActionTween.cpp
|
||||
2d/CCAnimation.cpp
|
||||
2d/CCAnimationCache.cpp
|
||||
2d/CCAtlasNode.cpp
|
||||
2d/CCClippingNode.cpp
|
||||
2d/CCComponent.cpp
|
||||
2d/CCComponentContainer.cpp
|
||||
2d/CCDrawNode.cpp
|
||||
2d/CCDrawingPrimitives.cpp
|
||||
2d/CCFastTMXLayer.cpp
|
||||
2d/CCFastTMXTiledMap.cpp
|
||||
2d/CCFont.cpp
|
||||
2d/CCFontAtlas.cpp
|
||||
2d/CCFontAtlasCache.cpp
|
||||
2d/CCFontCharMap.cpp
|
||||
2d/CCFontFNT.cpp
|
||||
2d/CCFontFreeType.cpp
|
||||
2d/CCGLBufferedNode.cpp
|
||||
2d/CCGrabber.cpp
|
||||
2d/CCGrid.cpp
|
||||
2d/CCLabel.cpp
|
||||
2d/CCLabelAtlas.cpp
|
||||
2d/CCLabelBMFont.cpp
|
||||
2d/CCLabelTTF.cpp
|
||||
2d/CCLabelTextFormatter.cpp
|
||||
2d/CCLayer.cpp
|
||||
2d/CCMenu.cpp
|
||||
2d/CCMenuItem.cpp
|
||||
2d/CCMotionStreak.cpp
|
||||
2d/CCNode.cpp
|
||||
2d/CCNodeGrid.cpp
|
||||
2d/CCParallaxNode.cpp
|
||||
2d/CCParticleBatchNode.cpp
|
||||
2d/CCParticleExamples.cpp
|
||||
2d/CCParticleSystem.cpp
|
||||
2d/CCParticleSystemQuad.cpp
|
||||
2d/CCProgressTimer.cpp
|
||||
2d/CCProtectedNode.cpp
|
||||
2d/CCRenderTexture.cpp
|
||||
2d/CCScene.cpp
|
||||
2d/CCSprite.cpp
|
||||
2d/CCSpriteBatchNode.cpp
|
||||
2d/CCSpriteFrame.cpp
|
||||
2d/CCSpriteFrameCache.cpp
|
||||
2d/CCTMXLayer.cpp
|
||||
2d/CCTMXObjectGroup.cpp
|
||||
2d/CCTMXTiledMap.cpp
|
||||
2d/CCTMXXMLParser.cpp
|
||||
2d/CCTextFieldTTF.cpp
|
||||
2d/CCTileMapAtlas.cpp
|
||||
2d/CCTransition.cpp
|
||||
2d/CCTransitionPageTurn.cpp
|
||||
2d/CCTransitionProgress.cpp
|
||||
2d/CCTweenFunction.cpp
|
||||
|
||||
3d/CCAABB.cpp
|
||||
3d/CCAnimate3D.cpp
|
||||
3d/CCAnimation3D.cpp
|
||||
3d/CCAttachNode.cpp
|
||||
3d/CCBundle3D.cpp
|
||||
3d/CCBundleReader.cpp
|
||||
3d/CCMesh.cpp
|
||||
3d/CCMeshSkin.cpp
|
||||
3d/CCMeshVertexIndexData.cpp
|
||||
3d/CCOBB.cpp
|
||||
3d/CCObjLoader.cpp
|
||||
3d/CCRay.cpp
|
||||
3d/CCSkeleton3D.cpp
|
||||
3d/CCSprite3D.cpp
|
||||
3d/CCSprite3DMaterial.cpp
|
||||
|
||||
network/HttpClient.cpp
|
||||
network/SocketIO.cpp
|
||||
network/WebSocket.cpp
|
||||
|
||||
ui/CocosGUI.cpp
|
||||
ui/UIButton.cpp
|
||||
ui/UICheckBox.cpp
|
||||
ui/UIDeprecated.cpp
|
||||
ui/UIHBox.cpp
|
||||
ui/UIHelper.cpp
|
||||
ui/UIImageView.cpp
|
||||
ui/UILayout.cpp
|
||||
ui/UILayoutManager.cpp
|
||||
ui/UILayoutParameter.cpp
|
||||
ui/UIListView.cpp
|
||||
ui/UILoadingBar.cpp
|
||||
ui/UIPageView.cpp
|
||||
ui/UIRelativeBox.cpp
|
||||
ui/UIRichText.cpp
|
||||
ui/UIScale9Sprite.cpp
|
||||
ui/UIScrollView.cpp
|
||||
ui/UISlider.cpp
|
||||
ui/UIText.cpp
|
||||
ui/UITextAtlas.cpp
|
||||
ui/UITextBMFont.cpp
|
||||
ui/UITextField.cpp
|
||||
ui/UIVBox.cpp
|
||||
ui/UIVideoPlayerAndroid.cpp
|
||||
ui/UIWebView.cpp
|
||||
ui/UIWebViewImpl_android.cpp
|
||||
ui/UIWidget.cpp
|
||||
ui/UIEditBox/UIEditBox.cpp
|
||||
ui/UIEditBox/UIEditBoxImplAndroid.cpp
|
||||
ui/UIEditBox/UIEditBoxImplNone.cpp
|
||||
ui/UIEditBox/UIEditBoxImplWin.cpp
|
||||
ui/UIEditBox/UIEditBoxImplWp8.cpp
|
||||
|
||||
math/CCAffineTransform.cpp
|
||||
math/CCGeometry.cpp
|
||||
math/CCVertex.cpp
|
||||
math/Mat4.cpp
|
||||
math/MathUtil.cpp
|
||||
math/Quaternion.cpp
|
||||
math/TransformUtils.cpp
|
||||
math/Vec2.cpp
|
||||
math/Vec3.cpp
|
||||
math/Vec4.cpp
|
||||
|
||||
renderer/CCBatchCommand.cpp
|
||||
renderer/CCCustomCommand.cpp
|
||||
renderer/CCGLProgram.cpp
|
||||
renderer/CCGLProgramCache.cpp
|
||||
renderer/CCGLProgramState.cpp
|
||||
renderer/CCGLProgramStateCache.cpp
|
||||
renderer/CCGroupCommand.cpp
|
||||
renderer/CCMeshCommand.cpp
|
||||
renderer/CCPrimitive.cpp
|
||||
renderer/CCPrimitiveCommand.cpp
|
||||
renderer/CCQuadCommand.cpp
|
||||
renderer/CCRenderCommand.cpp
|
||||
renderer/CCRenderer.cpp
|
||||
renderer/CCTexture2D.cpp
|
||||
renderer/CCTextureAtlas.cpp
|
||||
renderer/CCTextureCache.cpp
|
||||
renderer/CCTrianglesCommand.cpp
|
||||
renderer/CCVertexIndexBuffer.cpp
|
||||
renderer/CCVertexIndexData.cpp
|
||||
renderer/ccGLStateCache.cpp
|
||||
renderer/ccShaders.cpp
|
||||
|
||||
deprecated/CCArray.cpp
|
||||
deprecated/CCDeprecated.cpp
|
||||
deprecated/CCDictionary.cpp
|
||||
deprecated/CCNotificationCenter.cpp
|
||||
deprecated/CCSet.cpp
|
||||
deprecated/CCString.cpp
|
||||
|
||||
physics/CCPhysicsBody.cpp
|
||||
physics/CCPhysicsContact.cpp
|
||||
physics/CCPhysicsJoint.cpp
|
||||
physics/CCPhysicsShape.cpp
|
||||
physics/CCPhysicsWorld.cpp
|
||||
physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp
|
||||
physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp
|
||||
physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp
|
||||
physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp
|
||||
physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp
|
||||
|
||||
platform/CCFileUtils.cpp
|
||||
platform/CCGLView.cpp
|
||||
platform/CCImage.cpp
|
||||
platform/CCSAXParser.cpp
|
||||
platform/CCThread.cpp
|
||||
|
||||
storage/local-storage/LocalStorage.cpp
|
||||
storage/local-storage/LocalStorageAndroid.cpp
|
||||
)
|
||||
|
||||
if(MACOSX)
|
||||
set(COCOS2D_BASE_SRC
|
||||
${COCOS2D_BASE_SRC}
|
||||
ui/UIEditBox/UIEditBoxImplIOS.mm
|
||||
ui/UIEditBox/UIEditBoxImplMac.mm
|
||||
base/CCUserDefault.mm
|
||||
)
|
||||
endif()
|
||||
|
||||
set(COCOS2D_EDITOR_SUPPORT_SRC
|
||||
editor-support/cocosbuilder/CCBAnimationManager.cpp
|
||||
editor-support/cocosbuilder/CCBFileLoader.cpp
|
||||
editor-support/cocosbuilder/CCBKeyframe.cpp
|
||||
editor-support/cocosbuilder/CCBReader.cpp
|
||||
editor-support/cocosbuilder/CCBSequence.cpp
|
||||
editor-support/cocosbuilder/CCBSequenceProperty.cpp
|
||||
editor-support/cocosbuilder/CCControlButtonLoader.cpp
|
||||
editor-support/cocosbuilder/CCControlLoader.cpp
|
||||
editor-support/cocosbuilder/CCLabelBMFontLoader.cpp
|
||||
editor-support/cocosbuilder/CCLabelTTFLoader.cpp
|
||||
editor-support/cocosbuilder/CCLayerColorLoader.cpp
|
||||
editor-support/cocosbuilder/CCLayerGradientLoader.cpp
|
||||
editor-support/cocosbuilder/CCLayerLoader.cpp
|
||||
editor-support/cocosbuilder/CCMenuItemImageLoader.cpp
|
||||
editor-support/cocosbuilder/CCMenuItemLoader.cpp
|
||||
editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp
|
||||
editor-support/cocosbuilder/CCNodeLoader.cpp
|
||||
editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp
|
||||
editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp
|
||||
editor-support/cocosbuilder/CCScale9SpriteLoader.cpp
|
||||
editor-support/cocosbuilder/CCScrollViewLoader.cpp
|
||||
editor-support/cocosbuilder/CCSpriteLoader.cpp
|
||||
|
||||
editor-support/spine/Animation.cpp
|
||||
editor-support/spine/AnimationState.cpp
|
||||
editor-support/spine/AnimationStateData.cpp
|
||||
editor-support/spine/Atlas.cpp
|
||||
editor-support/spine/AtlasAttachmentLoader.cpp
|
||||
editor-support/spine/Attachment.cpp
|
||||
editor-support/spine/AttachmentLoader.cpp
|
||||
editor-support/spine/Bone.cpp
|
||||
editor-support/spine/BoneData.cpp
|
||||
editor-support/spine/BoundingBoxAttachment.cpp
|
||||
editor-support/spine/CCSkeleton.cpp
|
||||
editor-support/spine/CCSkeletonAnimation.cpp
|
||||
editor-support/spine/Event.cpp
|
||||
editor-support/spine/EventData.cpp
|
||||
editor-support/spine/Json.cpp
|
||||
editor-support/spine/RegionAttachment.cpp
|
||||
editor-support/spine/Skeleton.cpp
|
||||
editor-support/spine/SkeletonBounds.cpp
|
||||
editor-support/spine/SkeletonData.cpp
|
||||
editor-support/spine/SkeletonJson.cpp
|
||||
editor-support/spine/Skin.cpp
|
||||
editor-support/spine/Slot.cpp
|
||||
editor-support/spine/SlotData.cpp
|
||||
editor-support/spine/extension.cpp
|
||||
editor-support/spine/spine-cocos2dx.cpp
|
||||
|
||||
editor-support/cocostudio/CCActionFrame.cpp
|
||||
editor-support/cocostudio/CCActionFrameEasing.cpp
|
||||
editor-support/cocostudio/CCActionManagerEx.cpp
|
||||
editor-support/cocostudio/CCActionNode.cpp
|
||||
editor-support/cocostudio/CCActionObject.cpp
|
||||
editor-support/cocostudio/CCArmature.cpp
|
||||
editor-support/cocostudio/CCArmatureAnimation.cpp
|
||||
editor-support/cocostudio/CCArmatureDataManager.cpp
|
||||
editor-support/cocostudio/CCArmatureDefine.cpp
|
||||
editor-support/cocostudio/CCBatchNode.cpp
|
||||
editor-support/cocostudio/CCBone.cpp
|
||||
editor-support/cocostudio/CCColliderDetector.cpp
|
||||
editor-support/cocostudio/CCComAttribute.cpp
|
||||
editor-support/cocostudio/CCComAudio.cpp
|
||||
editor-support/cocostudio/CCComController.cpp
|
||||
editor-support/cocostudio/CCComRender.cpp
|
||||
editor-support/cocostudio/CCDataReaderHelper.cpp
|
||||
editor-support/cocostudio/CCDatas.cpp
|
||||
editor-support/cocostudio/CCDecorativeDisplay.cpp
|
||||
editor-support/cocostudio/CCDisplayFactory.cpp
|
||||
editor-support/cocostudio/CCDisplayManager.cpp
|
||||
editor-support/cocostudio/CCInputDelegate.cpp
|
||||
editor-support/cocostudio/CCProcessBase.cpp
|
||||
editor-support/cocostudio/CCSGUIReader.cpp
|
||||
editor-support/cocostudio/CCSSceneReader.cpp
|
||||
editor-support/cocostudio/CCSkin.cpp
|
||||
editor-support/cocostudio/CCSpriteFrameCacheHelper.cpp
|
||||
editor-support/cocostudio/CCTransformHelp.cpp
|
||||
editor-support/cocostudio/CCTween.cpp
|
||||
editor-support/cocostudio/CCUtilMath.cpp
|
||||
editor-support/cocostudio/CocoLoader.cpp
|
||||
editor-support/cocostudio/DictionaryHelper.cpp
|
||||
editor-support/cocostudio/TriggerBase.cpp
|
||||
editor-support/cocostudio/TriggerMng.cpp
|
||||
editor-support/cocostudio/TriggerObj.cpp
|
||||
editor-support/cocostudio/WidgetReader/WidgetReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/WidgetReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp
|
||||
editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp
|
||||
editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp
|
||||
editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp
|
||||
editor-support/cocostudio/ActionTimeline/CCFrame.cpp
|
||||
editor-support/cocostudio/ActionTimeline/CCNodeReader.cpp
|
||||
editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set(COCOS2D_AUDIO_SRC
|
||||
audio/linux/FmodAudioPlayer.cpp
|
||||
audio/linux/SimpleAudioEngineFMOD.cpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
# split it in _C and non C
|
||||
# because C files needs to be compiled with C compiler and not C++
|
||||
# compiler
|
||||
set(COCOS2D_AUDIO_SRC_C
|
||||
audio/mac/CDAudioManager.m
|
||||
audio/mac/CDOpenALSupport.m
|
||||
audio/mac/CocosDenshion.m
|
||||
audio/mac/SimpleAudioEngine_objc.m
|
||||
)
|
||||
set(COCOS2D_AUDIO_SRC
|
||||
${COCOS2D_AUDIO_SRC_C}
|
||||
audio/mac/SimpleAudioEngine.mm
|
||||
audio/mac/CDXMacOSXSupport.mm
|
||||
)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${COCOS2D_AUDIO_SRC_C}
|
||||
PROPERTIES LANGUAGE C
|
||||
)
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
||||
endif()
|
||||
|
||||
# For external projects, leave one empty line
|
||||
# between projects
|
||||
set(COCOS2D_EXTERNAL_SRC
|
||||
../external/tinyxml2/tinyxml2.cpp
|
||||
|
||||
../external/xxhash/xxhash.c
|
||||
|
||||
../external/unzip/ioapi.cpp
|
||||
../external/unzip/unzip.cpp
|
||||
|
||||
../external/edtaa3func/edtaa3func.cpp
|
||||
|
||||
../external/ConvertUTF/ConvertUTF.c
|
||||
../external/ConvertUTF/ConvertUTFWrapper.cpp
|
||||
)
|
||||
|
||||
set(COCOS2D_DESKTOP_SRC
|
||||
platform/desktop/CCGLViewImpl.cpp
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set(COCOS2D_PLATFORM_SRC
|
||||
${COCOS2D_DESKTOP_SRC}
|
||||
platform/linux/CCApplication.cpp
|
||||
platform/linux/CCCommon.cpp
|
||||
platform/linux/CCDevice.cpp
|
||||
platform/linux/CCFileUtilsLinux.cpp
|
||||
platform/linux/CCStdC.cpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
set(COCOS2D_PLATFORM_SRC
|
||||
${COCOS2D_DESKTOP_SRC}
|
||||
platform/mac/CCApplication.mm
|
||||
platform/mac/CCCommon.mm
|
||||
platform/mac/CCDevice.mm
|
||||
platform/apple/CCLock.cpp
|
||||
platform/apple/CCFileUtilsApple.mm
|
||||
platform/apple/CCThread.mm
|
||||
)
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported architecture, CMake will exit" )
|
||||
endif()
|
||||
|
||||
set(COCOS2D_SRC
|
||||
${COCOS2D_BASE_SRC}
|
||||
${COCOS2D_PLATFORM_SRC}
|
||||
${COCOS2D_EXTERNAL_SRC}
|
||||
${COCOS2D_AUDIO_SRC}
|
||||
${COCOS2D_EDITOR_SUPPORT_SRC}
|
||||
)
|
||||
|
||||
set(COCOS2D_EXTENSIONS_SRC
|
||||
../extensions/ExtensionDeprecated.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlButton.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlColourPicker.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControl.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlHuePicker.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlSlider.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlStepper.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlSwitch.cpp
|
||||
../extensions/GUI/CCControlExtension/CCControlUtils.cpp
|
||||
../extensions/GUI/CCControlExtension/CCInvocation.cpp
|
||||
../extensions/GUI/CCScrollView/CCScrollView.cpp
|
||||
../extensions/GUI/CCScrollView/CCTableViewCell.cpp
|
||||
../extensions/GUI/CCScrollView/CCTableView.cpp
|
||||
../extensions/assets-manager/AssetsManager.cpp
|
||||
../extensions/physics-nodes/CCPhysicsDebugNode.cpp
|
||||
../extensions/physics-nodes/CCPhysicsSprite.cpp
|
||||
)
|
||||
|
||||
set(CHIPMUNK_SRC
|
||||
../external/chipmunk/src/chipmunk.c
|
||||
../external/chipmunk/src/cpArbiter.c
|
||||
../external/chipmunk/src/cpArray.c
|
||||
../external/chipmunk/src/cpBB.c
|
||||
../external/chipmunk/src/cpBBTree.c
|
||||
../external/chipmunk/src/cpBody.c
|
||||
../external/chipmunk/src/cpCollision.c
|
||||
../external/chipmunk/src/cpHashSet.c
|
||||
../external/chipmunk/src/cpPolyShape.c
|
||||
../external/chipmunk/src/cpShape.c
|
||||
../external/chipmunk/src/cpSpace.c
|
||||
../external/chipmunk/src/cpSpaceComponent.c
|
||||
../external/chipmunk/src/cpSpaceHash.c
|
||||
../external/chipmunk/src/cpSpaceQuery.c
|
||||
../external/chipmunk/src/cpSpaceStep.c
|
||||
../external/chipmunk/src/cpSpatialIndex.c
|
||||
../external/chipmunk/src/cpSweep1D.c
|
||||
../external/chipmunk/src/cpVect.c
|
||||
../external/chipmunk/src/constraints/cpConstraint.c
|
||||
../external/chipmunk/src/constraints/cpDampedRotarySpring.c
|
||||
../external/chipmunk/src/constraints/cpDampedSpring.c
|
||||
../external/chipmunk/src/constraints/cpGearJoint.c
|
||||
../external/chipmunk/src/constraints/cpGrooveJoint.c
|
||||
../external/chipmunk/src/constraints/cpPinJoint.c
|
||||
../external/chipmunk/src/constraints/cpPivotJoint.c
|
||||
../external/chipmunk/src/constraints/cpRatchetJoint.c
|
||||
../external/chipmunk/src/constraints/cpRotaryLimitJoint.c
|
||||
../external/chipmunk/src/constraints/cpSimpleMotor.c
|
||||
../external/chipmunk/src/constraints/cpSlideJoint.c
|
||||
)
|
||||
|
||||
set(BOX2D_SRC
|
||||
../external/Box2D/Collision/b2BroadPhase.cpp
|
||||
../external/Box2D/Collision/b2CollideCircle.cpp
|
||||
../external/Box2D/Collision/b2CollideEdge.cpp
|
||||
../external/Box2D/Collision/b2CollidePolygon.cpp
|
||||
../external/Box2D/Collision/b2Collision.cpp
|
||||
../external/Box2D/Collision/b2Distance.cpp
|
||||
../external/Box2D/Collision/b2DynamicTree.cpp
|
||||
../external/Box2D/Collision/b2TimeOfImpact.cpp
|
||||
../external/Box2D/Collision/Shapes/b2ChainShape.cpp
|
||||
../external/Box2D/Collision/Shapes/b2CircleShape.cpp
|
||||
../external/Box2D/Collision/Shapes/b2EdgeShape.cpp
|
||||
../external/Box2D/Collision/Shapes/b2PolygonShape.cpp
|
||||
../external/Box2D/Common/b2BlockAllocator.cpp
|
||||
../external/Box2D/Common/b2Draw.cpp
|
||||
../external/Box2D/Common/b2Math.cpp
|
||||
../external/Box2D/Common/b2Settings.cpp
|
||||
../external/Box2D/Common/b2StackAllocator.cpp
|
||||
../external/Box2D/Common/b2Timer.cpp
|
||||
../external/Box2D/Dynamics/b2Body.cpp
|
||||
../external/Box2D/Dynamics/b2ContactManager.cpp
|
||||
../external/Box2D/Dynamics/b2Fixture.cpp
|
||||
../external/Box2D/Dynamics/b2Island.cpp
|
||||
../external/Box2D/Dynamics/b2World.cpp
|
||||
../external/Box2D/Dynamics/b2WorldCallbacks.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2DistanceJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2FrictionJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2GearJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2Joint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2MotorJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2MouseJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2PulleyJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2RopeJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2WeldJoint.cpp
|
||||
../external/Box2D/Dynamics/Joints/b2WheelJoint.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2CircleContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2Contact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2ContactSolver.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp
|
||||
../external/Box2D/Dynamics/Contacts/b2PolygonContact.cpp
|
||||
../external/Box2D/Rope/b2Rope.cpp
|
||||
)
|
||||
|
||||
add_library(cocos2d STATIC ${COCOS2D_SRC} ${COCOS2D_EXTENSIONS_SRC} ${BOX2D_SRC} ${CHIPMUNK_SRC})
|
||||
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set(FMOD_LIB "fmodex64")
|
||||
else()
|
||||
elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(FMOD_LIB "fmodex")
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported architecture, CMake will exit" )
|
||||
endif()
|
||||
target_link_libraries(cocos2d jpeg webp tiff freetype fontconfig png pthread glfw GLEW GL X11 rt z ${FMOD_LIB} curl)
|
||||
|
||||
if(LINUX)
|
||||
set(PLATFORM_SPECIFIC_LIBS
|
||||
pthread
|
||||
fontconfig
|
||||
GLEW
|
||||
X11
|
||||
rt
|
||||
glfw
|
||||
GL
|
||||
${FMOD_LIB}
|
||||
)
|
||||
elseif(MACOSX)
|
||||
INCLUDE_DIRECTORIES ( /System/Library/Frameworks )
|
||||
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
||||
FIND_LIBRARY(OPENGL_LIBRARY OpenGL )
|
||||
FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
FIND_LIBRARY(OPENAL_LIBRARY OpenAL )
|
||||
FIND_LIBRARY(QUARTZCORE_LIBRARY QuartzCore )
|
||||
FIND_LIBRARY(APPLICATIONSERVICES_LIBRARY ApplicationServices)
|
||||
FIND_LIBRARY(IOKIT_LIBRARY IOKit)
|
||||
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation)
|
||||
set(PLATFORM_SPECIFIC_LIBS
|
||||
glfw3
|
||||
websockets
|
||||
${COCOA_LIBRARY}
|
||||
${OPENGL_LIBRARY}
|
||||
${OPENAL_LIBRARY}
|
||||
${AUDIOTOOLBOX_LIBRARY}
|
||||
${QUARTZCORE_LIBRARY}
|
||||
${APPLICATIONSERVICES_LIBRARY}
|
||||
${IOKIT_LIBRARY}
|
||||
${FOUNDATION_LIBRARY}
|
||||
)
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
||||
endif()
|
||||
|
||||
target_link_libraries(cocos2d jpeg webp tiff freetype png z curl ${PLATFORM_SPECIFIC_LIBS})
|
||||
|
||||
set_target_properties(cocos2d
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
VERSION ${COCOS2D_X_VERSION}
|
||||
)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
#include "SimpleAudioEngine_objc.h"
|
||||
#include <string>
|
||||
|
||||
#include "CCFileUtils.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
using namespace cocos2d;
|
||||
|
||||
static void static_end()
|
||||
|
|
|
@ -46,9 +46,7 @@ public:
|
|||
ACCELERATION,
|
||||
MOUSE,
|
||||
FOCUS,
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
GAME_CONTROLLER,
|
||||
#endif
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
|
|
|
@ -54,9 +54,7 @@ public:
|
|||
MOUSE,
|
||||
ACCELERATION,
|
||||
FOCUS,
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
GAME_CONTROLLER,
|
||||
#endif
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
|
|
|
@ -23,16 +23,19 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#import "CCUserDefault.h"
|
||||
#import <string>
|
||||
#import "platform/CCFileUtils.h"
|
||||
#import "tinyxml2.h"
|
||||
#import "CCPlatformConfig.h"
|
||||
#import "CCPlatformMacros.h"
|
||||
#import "base64.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
|
||||
#import "platform/CCFileUtils.h"
|
||||
|
||||
#define XML_FILE_NAME "UserDefault.xml"
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ THE SOFTWARE.
|
|||
|
||||
// 2d nodes
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCProtectedNode.h"
|
||||
#include "2d/CCAtlasNode.h"
|
||||
#include "2d/CCDrawingPrimitives.h"
|
||||
#include "2d/CCDrawNode.h"
|
||||
|
@ -266,6 +267,20 @@ THE SOFTWARE.
|
|||
#include "2d/CCComponent.h"
|
||||
#include "2d/CCComponentContainer.h"
|
||||
|
||||
//3d
|
||||
#include "3d/CCAABB.h"
|
||||
#include "3d/CCOBB.h"
|
||||
#include "3d/CCRay.h"
|
||||
#include "3d/CCSprite3D.h"
|
||||
#include "3d/CCMesh.h"
|
||||
#include "3d/CCMeshSkin.h"
|
||||
#include "3d/CCAnimate3D.h"
|
||||
#include "3d/CCAnimation3D.h"
|
||||
#include "3d/CCSprite3DMaterial.h"
|
||||
#include "3d/CCAttachNode.h"
|
||||
#include "3d/CCMeshVertexIndexData.h"
|
||||
#include "3d/CCSkeleton3D.h"
|
||||
|
||||
// Deprecated include
|
||||
#include "deprecated/CCDictionary.h"
|
||||
#include "deprecated/CCArray.h"
|
||||
|
@ -279,9 +294,6 @@ THE SOFTWARE.
|
|||
// CCDeprecated.h must be included at the end
|
||||
#include "deprecated/CCDeprecated.h"
|
||||
|
||||
//3d
|
||||
#include "3d/cocos3d.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
set(COCOS_MATH_SRC
|
||||
math/CCAffineTransform.cpp
|
||||
math/CCGeometry.cpp
|
||||
math/CCVertex.cpp
|
||||
math/Mat4.cpp
|
||||
math/MathUtil.cpp
|
||||
math/Quaternion.cpp
|
||||
math/TransformUtils.cpp
|
||||
math/Vec2.cpp
|
||||
math/Vec3.cpp
|
||||
math/Vec4.cpp
|
||||
)
|
||||
|
|
@ -26,9 +26,10 @@
|
|||
#ifndef __CC_FILEUTILS_APPLE_H__
|
||||
#define __CC_FILEUTILS_APPLE_H__
|
||||
|
||||
#include "CCFileUtils.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "base/CCPlatformMacros.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
||||
|
|
|
@ -25,16 +25,18 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "CCFileUtilsApple.h"
|
||||
|
||||
#include <string>
|
||||
#include <stack>
|
||||
#include "deprecated/CCString.h"
|
||||
#include "CCFileUtils.h"
|
||||
|
||||
#include "base/CCDirector.h"
|
||||
#include "CCSAXParser.h"
|
||||
#include "CCDictionary.h"
|
||||
#include "deprecated/CCString.h"
|
||||
#include "deprecated/CCDictionary.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "platform/CCSAXParser.h"
|
||||
#include "unzip.h"
|
||||
|
||||
#include "CCFileUtilsApple.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -22,8 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
//#import <UIKit/UIKit.h>
|
||||
#include "CCThread.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "platform/CCThread.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -1,48 +1,118 @@
|
|||
set(cocos_root ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
||||
|
||||
include_directories(
|
||||
${cocos_root}/external/lua/tolua/
|
||||
${cocos_root}/external/lua/tolua
|
||||
${cocos_root}/external/lua/lua
|
||||
${cocos_root}/external/lua
|
||||
${cocos_root}/external/xxtea
|
||||
${cocos_root}/external
|
||||
${cocos_root}/cocos
|
||||
${cocos_root}/cocos/base
|
||||
${cocos_root}/cocos/physics
|
||||
${cocos_root}/cocos/audio/include
|
||||
${cocos_root}/external
|
||||
${cocos_root}/cocos
|
||||
${cocos_root}/cocos/ui
|
||||
${cocos_root}/cocos/2d
|
||||
${cocos_root}/cocos/3d
|
||||
${cocos_root}/cocos/editor-support/spine
|
||||
${cocos_root}/cocos/editor-support/cocostudio
|
||||
${cocos_root}/cocos/editor-support/spine
|
||||
${cocos_root}/cocos/editor-support/cocostudio
|
||||
${cocos_root}/cocos/editor-support/cocosbuilder
|
||||
${cocos_root}/cocos/ui
|
||||
${cocos_root}/cocos/network
|
||||
${cocos_root}/cocos/storage
|
||||
${cocos_root}/cocos/editor-support
|
||||
${cocos_root}/cocos/platform
|
||||
${cocos_root}/cocos/editor-support
|
||||
${cocos_root}/cocos/platform
|
||||
${cocos_root}/cocos/audio/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual/extension
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual/cocostudio
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual/ui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual/cocos2d
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/auto
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/manual/cocos2d
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/auto
|
||||
)
|
||||
|
||||
file(GLOB lua_cocos2d_source_files
|
||||
file(GLOB lua_cocos2d_source_files
|
||||
"${cocos_root}/external/lua/lua/*.c"
|
||||
"${cocos_root}/external/lua/tolua/*.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/auto/*.cpp"
|
||||
"${cocos_root}/external/xxtea/xxtea.cpp"
|
||||
)
|
||||
file(GLOB_RECURSE lua_binding_manual_files "${CMAKE_CURRENT_SOURCE_DIR}/manual/*.cpp")
|
||||
set(lua_cocos2d_source_files ${lua_cocos2d_source_files} ${lua_binding_manual_files})
|
||||
# exclude files for other platforms
|
||||
list(REMOVE_ITEM lua_cocos2d_source_files
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/manual/platform/android/CCLuaJavaBridge.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp"
|
||||
)
|
||||
|
||||
add_library(luacocos2d STATIC ${lua_cocos2d_source_files})
|
||||
# luasockets are needed in Linux too,
|
||||
# but Linux have them disabled for some reason
|
||||
if(MACOSX)
|
||||
set(lua_cocos2d_source_files
|
||||
${lua_cocos2d_source_files}
|
||||
${cocos_root}/external/lua/luasocket/auxiliar.c
|
||||
${cocos_root}/external/lua/luasocket/buffer.c
|
||||
${cocos_root}/external/lua/luasocket/except.c
|
||||
${cocos_root}/external/lua/luasocket/inet.c
|
||||
${cocos_root}/external/lua/luasocket/io.c
|
||||
${cocos_root}/external/lua/luasocket/luasocket.c
|
||||
${cocos_root}/external/lua/luasocket/mime.c
|
||||
${cocos_root}/external/lua/luasocket/options.c
|
||||
${cocos_root}/external/lua/luasocket/select.c
|
||||
${cocos_root}/external/lua/luasocket/serial.c
|
||||
${cocos_root}/external/lua/luasocket/tcp.c
|
||||
${cocos_root}/external/lua/luasocket/timeout.c
|
||||
${cocos_root}/external/lua/luasocket/udp.c
|
||||
${cocos_root}/external/lua/luasocket/unix.c
|
||||
${cocos_root}/external/lua/luasocket/usocket.c
|
||||
)
|
||||
endif()
|
||||
|
||||
set(lua_bindings_manual_files
|
||||
manual/CCLuaBridge.cpp
|
||||
manual/CCLuaEngine.cpp
|
||||
manual/CCLuaStack.cpp
|
||||
manual/CCLuaValue.cpp
|
||||
manual/Cocos2dxLuaLoader.cpp
|
||||
manual/LuaBasicConversions.cpp
|
||||
manual/tolua_fix.cpp
|
||||
manual/cocos2d/LuaOpengl.cpp
|
||||
manual/cocos2d/LuaScriptHandlerMgr.cpp
|
||||
manual/cocos2d/lua_cocos2dx_deprecated.cpp
|
||||
manual/cocos2d/lua_cocos2dx_experimental_manual.cpp
|
||||
manual/cocos2d/lua_cocos2dx_manual.cpp
|
||||
manual/cocos2d/lua_cocos2dx_physics_manual.cpp
|
||||
manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp
|
||||
manual/3d/lua_cocos2dx_3d_manual.cpp
|
||||
manual/cocosbuilder/CCBProxy.cpp
|
||||
manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp
|
||||
manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp
|
||||
manual/cocostudio/CustomGUIReader.cpp
|
||||
manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp
|
||||
manual/controller/lua_cocos2dx_controller_manual.cpp
|
||||
manual/extension/lua_cocos2dx_extension_manual.cpp
|
||||
manual/network/lua_extensions.c
|
||||
manual/network/lua_cocos2dx_network_manual.cpp
|
||||
manual/network/Lua_web_socket.cpp
|
||||
manual/network/lua_xml_http_request.cpp
|
||||
manual/spine/lua_cocos2dx_spine_manual.cpp
|
||||
manual/spine/LuaSkeletonAnimation.cpp
|
||||
manual/ui/lua_cocos2dx_experimental_video_manual.cpp
|
||||
manual/ui/lua_cocos2dx_ui_manual.cpp
|
||||
manual/video/lua_cocos2dx_experimental_video_manual.cpp
|
||||
)
|
||||
|
||||
set(lua_bindings_auto_files
|
||||
auto/lua_cocos2dx_3d_auto.cpp
|
||||
auto/lua_cocos2dx_auto.cpp
|
||||
auto/lua_cocos2dx_cocosbuilder_auto.cpp
|
||||
auto/lua_cocos2dx_cocosdenshion_auto.cpp
|
||||
auto/lua_cocos2dx_controller_auto.cpp
|
||||
auto/lua_cocos2dx_experimental_auto.cpp
|
||||
auto/lua_cocos2dx_experimental_video_auto.cpp
|
||||
auto/lua_cocos2dx_extension_auto.cpp
|
||||
auto/lua_cocos2dx_physics_auto.cpp
|
||||
auto/lua_cocos2dx_spine_auto.cpp
|
||||
auto/lua_cocos2dx_studio_auto.cpp
|
||||
auto/lua_cocos2dx_ui_auto.cpp
|
||||
)
|
||||
|
||||
if(MACOSX)
|
||||
set(lua_bindings_manual_files
|
||||
${lua_bindings_manual_files}
|
||||
manual/platform/ios/CCLuaObjcBridge.mm
|
||||
)
|
||||
endif()
|
||||
|
||||
set(lua_bindings_files ${lua_cocos2d_source_files} ${lua_bindings_manual_files} ${lua_bindings_auto_files})
|
||||
|
||||
add_library(luacocos2d STATIC ${lua_bindings_files})
|
||||
target_link_libraries(luacocos2d cocos2d)
|
||||
set_target_properties(luacocos2d
|
||||
PROPERTIES
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "lua_cocos2dx_3d_auto.hpp"
|
||||
#include "cocos3d.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "lua_cocos2dx_auto.hpp"
|
||||
#include "cocos2d.h"
|
||||
#include "CCProtectedNode.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "lua_cocos2dx_controller_auto.hpp"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#include "CCGameController.h"
|
||||
#include "base/CCGameController.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ extern "C" {
|
|||
}
|
||||
#include "tolua_fix.h"
|
||||
#include "cocos2d.h"
|
||||
#include "3d/cocos3d.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "cocos2d/LuaScriptHandlerMgr.h"
|
||||
#include "CCLuaValue.h"
|
||||
#include "CCLuaEngine.h"
|
||||
#include "CCGameController.h"
|
||||
#include "base/CCGameController.h"
|
||||
|
||||
|
||||
static void cloneEventListenerControllerHandler(const cocos2d::EventListenerController* src,cocos2d::EventListenerController* dst, ScriptHandlerMgr::HandlerType type)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef __UIEDITBOXIMPLANDROID_H__
|
||||
#define __UIEDITBOXIMPLANDROID_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef __UIEditBoxIMPLIOS_H__
|
||||
#define __UIEditBoxIMPLIOS_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef __UIEditBoxIMPLMAC_H__
|
||||
#define __UIEditBoxIMPLMAC_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
****************************************************************************/
|
||||
#include "UIEditBoxImplWin.h"
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||
|
||||
#include "UIEditBox.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef __UIEditBoxIMPLWIN_H__
|
||||
#define __UIEditBoxIMPLWIN_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||
|
||||
#include "UIEditBoxImplWp8.h"
|
||||
#include "UIEditBox.h"
|
||||
#include "CCGLViewImpl.h"
|
||||
|
@ -305,3 +308,5 @@ std::string UIEditBoxImplWp8::PlatformStringTostring( Platform::String^ strSrc )
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // WP8
|
||||
|
|
|
@ -24,6 +24,9 @@ THE SOFTWARE.
|
|||
#ifndef __UIEditBoxIMPLWP8_H__
|
||||
#define __UIEditBoxIMPLWP8_H__
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||
|
||||
#include "UIEditBoxImpl.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -85,4 +88,6 @@ namespace ui {
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif //WP8
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
|
||||
#include "UIWebViewImpl_android.h"
|
||||
|
|
|
@ -21,10 +21,12 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
|
||||
#include "UIWebViewImpl_iOS.h"
|
||||
#include "UIWebView-inl.h"
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
#include "UIWebViewImpl_android.h"
|
||||
|
||||
#include <unordered_map>
|
||||
|
@ -433,3 +435,4 @@ namespace cocos2d {
|
|||
} // namespace experimental
|
||||
} //namespace cocos2d
|
||||
|
||||
#endif // __ANDROID__
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#ifndef __cocos2d_plugin_WebViewImpl_android_H_
|
||||
#define __cocos2d_plugin_WebViewImpl_android_H_
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cocos2d {
|
||||
|
@ -93,4 +95,6 @@ namespace cocos2d {
|
|||
} // namespace experimental
|
||||
} //cocos2d
|
||||
|
||||
#endif // __ANDROID__
|
||||
|
||||
#endif //__cocos2d_plugin_WebViewImpl_android_H_
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
set(APP_NAME cpp-empty-test)
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
set(PLATFORM_SRC
|
||||
proj.android/jni/hellocpp/main.cpp
|
||||
)
|
||||
|
||||
elseif(WINDOWS)
|
||||
|
||||
set(PLATFORM_SRC
|
||||
proj.win32/main.cpp
|
||||
)
|
||||
|
||||
elseif(IOS)
|
||||
|
||||
set(PLATFORM_SRC
|
||||
proj.ios/main.m
|
||||
proj.ios/AppController.mm
|
||||
|
@ -21,17 +18,18 @@ elseif(IOS)
|
|||
)
|
||||
|
||||
elseif(MACOSX)
|
||||
|
||||
set(PLATFORM_SRC
|
||||
proj.mac/main.m
|
||||
proj.mac/main.cpp
|
||||
)
|
||||
|
||||
elseif(LINUX)
|
||||
|
||||
set(PLATFORM_SRC
|
||||
proj.linux/main.cpp
|
||||
)
|
||||
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
||||
|
||||
endif()
|
||||
|
||||
set(SAMPLE_SRC
|
||||
|
@ -76,6 +74,7 @@ else()
|
|||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME} cocos2d)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "../Classes/AppDelegate.h"
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
|
|
|
@ -2,17 +2,21 @@ set(APP_NAME cpp-tests)
|
|||
|
||||
if(WIN32)
|
||||
set(PLATFORM_SRC
|
||||
Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp
|
||||
Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp
|
||||
proj.win32/main.cpp
|
||||
)
|
||||
else()
|
||||
elseif(MACOSX)
|
||||
set(PLATFORM_SRC
|
||||
proj.mac/main.cpp
|
||||
)
|
||||
elseif(LINUX)
|
||||
set(PLATFORM_SRC
|
||||
proj.linux/main.cpp
|
||||
)
|
||||
else()
|
||||
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
||||
endif()
|
||||
|
||||
set(SAMPLE_SRC
|
||||
set(TESTS_SRC
|
||||
Classes/ActionManagerTest/ActionManagerTest.cpp
|
||||
Classes/ActionsEaseTest/ActionsEaseTest.cpp
|
||||
Classes/ActionsProgressTest/ActionsProgressTest.cpp
|
||||
|
@ -189,6 +193,30 @@ set(SAMPLE_SRC
|
|||
${PLATFORM_SRC}
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set(EXTENDED_TESTS_SRC
|
||||
)
|
||||
else()
|
||||
set(EXTENDED_TESTS_SRC
|
||||
Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp
|
||||
Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp
|
||||
Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp
|
||||
|
||||
Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp
|
||||
Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
|
||||
Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp
|
||||
Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp
|
||||
Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UIScene.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp
|
||||
Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
include_directories(
|
||||
Classes
|
||||
${CMAKE_SOURCE_DIR}/external/chipmunk/include/chipmunk
|
||||
|
@ -197,7 +225,8 @@ include_directories(
|
|||
|
||||
# add the executable
|
||||
add_executable(${APP_NAME}
|
||||
${SAMPLE_SRC}
|
||||
${TESTS_SRC}
|
||||
${EXTENDED_TESTS_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(${APP_NAME}
|
||||
|
|
|
@ -27,9 +27,6 @@ THE SOFTWARE.
|
|||
#include <algorithm>
|
||||
#include "../testResource.h"
|
||||
|
||||
#include "3d/CCAttachNode.h"
|
||||
#include "3d/cocos3d.h"
|
||||
|
||||
////////////DrawLine/////////////////////
|
||||
|
||||
class DrawLine3D: public Node
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define _TEST_BASIC_H_
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "3d/cocos3d.h"
|
||||
#include "audio/include/SimpleAudioEngine.h"
|
||||
#include "VisibleRect.h"
|
||||
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
set(APP_NAME lua-empty-test)
|
||||
|
||||
set(SAMPLE_SRC
|
||||
proj.linux/main.cpp
|
||||
Classes/AppDelegate.cpp
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set(SAMPLE_SRC
|
||||
${SAMPLE_SRC}
|
||||
proj.linux/main.cpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
set(SAMPLE_SRC
|
||||
${SAMPLE_SRC}
|
||||
proj.mac/main.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
Classes
|
||||
../../../cocos/scripting/lua-bindings/manual
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
set(APP_NAME lua-tests)
|
||||
|
||||
set(SAMPLE_SRC
|
||||
proj.linux/main.cpp
|
||||
Classes/AppDelegate.cpp
|
||||
Classes/AppDelegate.cpp
|
||||
Classes/lua_assetsmanager_test_sample.cpp
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set(SAMPLE_SRC
|
||||
${SAMPLE_SRC}
|
||||
proj.linux/main.cpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
set(SAMPLE_SRC
|
||||
${SAMPLE_SRC}
|
||||
proj.ios_mac/mac/main.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
Classes
|
||||
../../../cocos/scripting/lua-bindings/manual
|
||||
|
|
Загрузка…
Ссылка в новой задаче