axmol/cocos/2d/CMakeLists.txt

204 lines
3.2 KiB
CMake

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/desktop/CCGLView.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/desktop/CCGLView.cpp
platform/linux/CCDevice.cpp
)
endif()
set(COCOS2D_SRC
CCAction.cpp
CCActionCamera.cpp
CCActionCatmullRom.cpp
CCActionEase.cpp
CCActionGrid.cpp
CCActionGrid3D.cpp
CCActionInstant.cpp
CCActionInterval.cpp
CCActionManager.cpp
CCActionPageTurn3D.cpp
CCActionProgressTimer.cpp
CCActionTiledGrid.cpp
CCActionTween.cpp
CCAnimation.cpp
CCAnimationCache.cpp
CCAtlasNode.cpp
CCClippingNode.cpp
CCComponent.cpp
CCComponentContainer.cpp
CCDrawNode.cpp
CCDrawingPrimitives.cpp
CCFont.cpp
CCFontAtlas.cpp
CCFontAtlasCache.cpp
CCFontCharMap.cpp
CCFontFNT.cpp
CCFontFreeType.cpp
CCGLBufferedNode.cpp
CCGLProgram.cpp
CCGrabber.cpp
CCGrid.cpp
CCIMEDispatcher.cpp
CCLabel.cpp
CCLabelAtlas.cpp
CCLabelBMFont.cpp
CCLabelTTF.cpp
CCLabelTextFormatter.cpp
CCLayer.cpp
CCMenu.cpp
CCMenuItem.cpp
CCMotionStreak.cpp
CCNode.cpp
CCNodeGrid.cpp
CCParallaxNode.cpp
CCParticleBatchNode.cpp
CCParticleExamples.cpp
CCParticleSystem.cpp
CCParticleSystemQuad.cpp
CCProgressTimer.cpp
CCRenderTexture.cpp
CCScene.cpp
CCScriptSupport.cpp
CCShaderCache.cpp
CCSprite.cpp
CCSpriteBatchNode.cpp
CCSpriteFrame.cpp
CCSpriteFrameCache.cpp
CCTMXLayer.cpp
CCTMXObjectGroup.cpp
CCTMXTiledMap.cpp
CCTMXXMLParser.cpp
CCTextFieldTTF.cpp
CCTexture2D.cpp
CCTextureAtlas.cpp
CCTextureCache.cpp
CCTileMapAtlas.cpp
CCTransition.cpp
CCTransitionPageTurn.cpp
CCTransitionProgress.cpp
CCTweenFunction.cpp
CCUserDefault.cpp
CCUserDefaultAndroid.cpp
CCVertex.cpp
TGAlib.cpp
TransformUtils.cpp
ccCArray.cpp
ccGLStateCache.cpp
ccShaders.cpp
ccUTF8.cpp
ccUtils.cpp
ccFPSImages.c
../cocos2d.cpp
platform/CCSAXParser.cpp
platform/CCThread.cpp
platform/CCGLViewProtocol.cpp
platform/CCFileUtils.cpp
platform/CCImage.cpp
../deprecated/CCDeprecated.cpp
../deprecated/CCNotificationCenter.cpp
../../external/edtaa3func/edtaa3func.cpp
)
include(../physics/CMakeLists.txt)
add_library(cocos2d STATIC
${COCOS2D_SRC}
${PLATFORM_SRC}
${COCOS_PHYSICS_SRC}
)
if(WIN32)
if(MINGW)
set(COCOS_LINK
z
jpeg
png
webp
tiff
glfw3
glew32
opengl32
iconv
freetype
bz2
)
else()
set(COCOS_LINK
libjpeg
libpng
libwebp
libtiff
freetype250
glfw3
glew32
opengl32
libiconv
libzlib
)
endif()
elseif(APPLE)
else()
set(COCOS_LINK
jpeg
webp
tiff
freetype
fontconfig
png
pthread
glfw
GLEW
GL
X11
rt
z
)
endif()
target_link_libraries(cocos2d
cocosrenderer
cocosbase
cocosmath
chipmunk_static
tinyxml2
unzip
xxhash
${COCOS_LINK}
)
set_target_properties(cocos2d
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)