2013-11-30 14:09:12 +08:00
|
|
|
if(WIN32)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
|
|
|
|
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
platform/win32/CCStdC.cpp
|
|
|
|
platform/win32/CCFileUtilsWin32.cpp
|
|
|
|
platform/win32/CCCommon.cpp
|
|
|
|
platform/win32/CCApplication.cpp
|
|
|
|
platform/win32/CCEGLView.cpp
|
|
|
|
platform/win32/CCImage.cpp
|
|
|
|
platform/win32/CCDevice.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
elseif(APPLE)
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
platform/linux/CCStdC.cpp
|
|
|
|
platform/linux/CCFileUtilsLinux.cpp
|
|
|
|
platform/linux/CCCommon.cpp
|
|
|
|
platform/linux/CCApplication.cpp
|
|
|
|
platform/linux/CCEGLView.cpp
|
|
|
|
platform/linux/CCImage.cpp
|
|
|
|
platform/linux/CCDevice.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2013-11-02 14:44:54 +08:00
|
|
|
set(COCOS2D_SRC
|
|
|
|
CCAction.cpp
|
|
|
|
CCActionCamera.cpp
|
|
|
|
CCActionEase.cpp
|
|
|
|
CCActionGrid.cpp
|
|
|
|
CCActionGrid3D.cpp
|
|
|
|
CCActionInstant.cpp
|
|
|
|
CCActionInterval.cpp
|
|
|
|
CCActionManager.cpp
|
|
|
|
CCActionPageTurn3D.cpp
|
|
|
|
CCActionProgressTimer.cpp
|
|
|
|
CCActionTiledGrid.cpp
|
|
|
|
CCActionCatmullRom.cpp
|
|
|
|
CCActionTween.cpp
|
|
|
|
CCAtlasNode.cpp
|
|
|
|
CCNode.cpp
|
|
|
|
CCEventAcceleration.cpp
|
|
|
|
CCEventListenerAcceleration.cpp
|
|
|
|
CCEvent.cpp
|
|
|
|
CCEventDispatcher.cpp
|
|
|
|
CCEventListener.cpp
|
|
|
|
CCEventKeyboard.cpp
|
|
|
|
CCEventListenerKeyboard.cpp
|
|
|
|
CCEventMouse.cpp
|
|
|
|
CCEventListenerMouse.cpp
|
|
|
|
CCTouch.cpp
|
|
|
|
CCEventTouch.cpp
|
|
|
|
CCEventListenerTouch.cpp
|
|
|
|
CCEventCustom.cpp
|
|
|
|
CCEventListenerCustom.cpp
|
|
|
|
CCDrawingPrimitives.cpp
|
|
|
|
CCDrawNode.cpp
|
|
|
|
CCGrabber.cpp
|
|
|
|
CCGrid.cpp
|
|
|
|
CCFont.cpp
|
|
|
|
CCFontAtlas.cpp
|
|
|
|
CCFontAtlasCache.cpp
|
|
|
|
CCFontAtlasFactory.cpp
|
|
|
|
CCFontDefinition.cpp
|
|
|
|
CCFontFNT.cpp
|
|
|
|
CCFontFreeType.cpp
|
|
|
|
CCLabel.cpp
|
|
|
|
CCLabelAtlas.cpp
|
|
|
|
CCLabelBMFont.cpp
|
|
|
|
CCLabelTTF.cpp
|
|
|
|
CCLabelTextFormatter.cpp
|
|
|
|
CCTextImage.cpp
|
|
|
|
CCLayer.cpp
|
|
|
|
CCScene.cpp
|
|
|
|
CCTransition.cpp
|
|
|
|
CCTransitionPageTurn.cpp
|
|
|
|
CCTransitionProgress.cpp
|
|
|
|
CCMenu.cpp
|
|
|
|
CCMenuItem.cpp
|
|
|
|
CCMotionStreak.cpp
|
|
|
|
CCProgressTimer.cpp
|
|
|
|
CCClippingNode.cpp
|
|
|
|
CCRenderTexture.cpp
|
|
|
|
CCParticleExamples.cpp
|
|
|
|
CCParticleSystem.cpp
|
|
|
|
CCParticleSystemQuad.cpp
|
|
|
|
CCParticleBatchNode.cpp
|
|
|
|
CCScriptSupport.cpp
|
|
|
|
CCAnimation.cpp
|
|
|
|
CCAnimationCache.cpp
|
|
|
|
CCSprite.cpp
|
|
|
|
CCSpriteBatchNode.cpp
|
|
|
|
CCSpriteFrame.cpp
|
|
|
|
CCSpriteFrameCache.cpp
|
|
|
|
ccUTF8.cpp
|
|
|
|
CCProfiling.cpp
|
|
|
|
CCUserDefault.cpp
|
|
|
|
TransformUtils.cpp
|
|
|
|
base64.cpp
|
|
|
|
ccUtils.cpp
|
|
|
|
CCVertex.cpp
|
|
|
|
CCNotificationCenter.cpp
|
|
|
|
TGAlib.cpp
|
|
|
|
ZipUtils.cpp
|
|
|
|
ccCArray.cpp
|
|
|
|
CCComponent.cpp
|
|
|
|
CCComponentContainer.cpp
|
|
|
|
CCIMEDispatcher.cpp
|
|
|
|
CCTextFieldTTF.cpp
|
|
|
|
CCTexture2D.cpp
|
|
|
|
CCTextureAtlas.cpp
|
|
|
|
CCTextureCache.cpp
|
|
|
|
CCParallaxNode.cpp
|
|
|
|
CCTMXLayer.cpp
|
|
|
|
CCTMXObjectGroup.cpp
|
|
|
|
CCTMXTiledMap.cpp
|
|
|
|
CCTMXXMLParser.cpp
|
|
|
|
CCTileMapAtlas.cpp
|
|
|
|
CCGLProgram.cpp
|
|
|
|
ccGLStateCache.cpp
|
|
|
|
CCShaderCache.cpp
|
|
|
|
ccShaders.cpp
|
|
|
|
CCCamera.cpp
|
|
|
|
CCConfiguration.cpp
|
|
|
|
CCDirector.cpp
|
|
|
|
CCScheduler.cpp
|
|
|
|
ccFPSImages.c
|
|
|
|
ccTypes.cpp
|
|
|
|
cocos2d.cpp
|
|
|
|
CCDeprecated.cpp
|
|
|
|
platform/CCSAXParser.cpp
|
|
|
|
platform/CCThread.cpp
|
|
|
|
platform/CCEGLViewProtocol.cpp
|
|
|
|
platform/CCFileUtils.cpp
|
2013-12-13 12:42:15 +08:00
|
|
|
../../external/edtaa3func/edtaa3func.cpp
|
2013-12-17 14:50:40 +08:00
|
|
|
renderer/CCNewRenderTexture.cpp
|
|
|
|
renderer/CCNewSprite.cpp
|
|
|
|
renderer/CCNewSpriteBatchNode.cpp
|
|
|
|
renderer/CCNewTextureAtlas.cpp
|
2013-12-18 10:47:46 +08:00
|
|
|
renderer/CCCustomCommand.cpp
|
|
|
|
renderer/CCFrustum.cpp
|
|
|
|
renderer/CCGroupCommand.cpp
|
|
|
|
renderer/CCMaterialManager.cpp
|
|
|
|
renderer/CCNewClippingNode.cpp
|
|
|
|
renderer/CCQuadCommand.cpp
|
|
|
|
renderer/CCRenderCommand.cpp
|
|
|
|
renderer/CCRenderer.cpp
|
|
|
|
renderer/CCRenderMaterial.cpp
|
2013-11-02 14:44:54 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
include(../physics/CMakeLists.txt)
|
|
|
|
|
|
|
|
add_library(cocos2d STATIC
|
|
|
|
${COCOS2D_SRC}
|
2013-11-30 14:09:12 +08:00
|
|
|
${PLATFORM_SRC}
|
2013-11-02 14:44:54 +08:00
|
|
|
${COCOS_PHYSICS_SRC}
|
|
|
|
)
|
2013-11-30 14:09:12 +08:00
|
|
|
|
|
|
|
if(WIN32)
|
2013-12-02 15:10:37 +08:00
|
|
|
|
|
|
|
if(MINGW)
|
|
|
|
|
|
|
|
set(COCOS_LINK
|
|
|
|
z
|
|
|
|
jpeg
|
|
|
|
png
|
|
|
|
webp
|
|
|
|
tiff
|
|
|
|
glfw3
|
|
|
|
glew32
|
|
|
|
opengl32
|
|
|
|
iconv
|
|
|
|
freetype
|
|
|
|
bz2
|
|
|
|
)
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
|
2013-11-30 14:09:12 +08:00
|
|
|
set(COCOS_LINK
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libwebp
|
|
|
|
libtiff
|
|
|
|
freetype250
|
|
|
|
glfw3
|
|
|
|
glew32
|
|
|
|
opengl32
|
|
|
|
libiconv
|
|
|
|
libzlib
|
|
|
|
)
|
2013-12-02 15:10:37 +08:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2013-11-30 14:09:12 +08:00
|
|
|
elseif(APPLE)
|
|
|
|
|
|
|
|
else()
|
|
|
|
set(COCOS_LINK
|
2013-11-04 13:10:04 +08:00
|
|
|
jpeg
|
|
|
|
webp
|
|
|
|
tiff
|
|
|
|
freetype
|
2013-11-30 14:09:12 +08:00
|
|
|
fontconfig
|
2013-12-02 15:10:37 +08:00
|
|
|
png
|
|
|
|
pthread
|
2013-11-04 13:10:04 +08:00
|
|
|
glfw
|
|
|
|
GLEW
|
|
|
|
GL
|
2013-11-06 14:54:35 +08:00
|
|
|
X11
|
2013-11-04 13:10:04 +08:00
|
|
|
rt
|
|
|
|
z
|
|
|
|
)
|
2013-11-30 14:09:12 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
target_link_libraries(cocos2d
|
|
|
|
cocosbase
|
|
|
|
chipmunk_static
|
|
|
|
tinyxml2
|
|
|
|
kazmath
|
|
|
|
unzip
|
|
|
|
${COCOS_LINK}
|
|
|
|
)
|
2013-11-04 14:49:42 +08:00
|
|
|
|
|
|
|
set_target_properties(cocos2d
|
|
|
|
PROPERTIES
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
|
|
|
)
|
|
|
|
|