mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6539 from ricardoquesada/cmake_improvements
linux cmake improvements
This commit is contained in:
commit
aa51fbd8db
|
@ -38,9 +38,6 @@ option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
|
||||||
option(USE_BOX2D "Use box2d for physics library" OFF)
|
option(USE_BOX2D "Use box2d for physics library" OFF)
|
||||||
option(DEBUG_MODE "Debug or release?" ON)
|
option(DEBUG_MODE "Debug or release?" ON)
|
||||||
option(BUILD_LIBS_LUA "Build lua libraries" OFF)
|
option(BUILD_LIBS_LUA "Build lua libraries" OFF)
|
||||||
option(BUILD_GUI "Build GUI library" ON)
|
|
||||||
option(BUILD_NETWORK "Build network library" ON)
|
|
||||||
option(BUILD_STORAGE "Build storage library" ON)
|
|
||||||
option(BUILD_EXTENSIONS "Build extension library" ON)
|
option(BUILD_EXTENSIONS "Build extension library" ON)
|
||||||
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
|
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
|
||||||
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
|
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
|
||||||
|
@ -54,9 +51,6 @@ option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
|
||||||
option(USE_BOX2D "Use box2d for physics library" OFF)
|
option(USE_BOX2D "Use box2d for physics library" OFF)
|
||||||
option(DEBUG_MODE "Debug or release?" ON)
|
option(DEBUG_MODE "Debug or release?" ON)
|
||||||
option(BUILD_LIBS_LUA "Build lua libraries" ON)
|
option(BUILD_LIBS_LUA "Build lua libraries" ON)
|
||||||
option(BUILD_GUI "Build GUI library" ON)
|
|
||||||
option(BUILD_NETWORK "Build network library" ON)
|
|
||||||
option(BUILD_STORAGE "Build storage library" ON)
|
|
||||||
option(BUILD_EXTENSIONS "Build extension library" ON)
|
option(BUILD_EXTENSIONS "Build extension library" ON)
|
||||||
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
|
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
|
||||||
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
|
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
|
||||||
|
@ -136,6 +130,7 @@ endif()
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/audio/include
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/auto
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/auto
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/manual
|
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/manual
|
||||||
|
@ -227,32 +222,8 @@ add_subdirectory(external/xxhash)
|
||||||
# audio
|
# audio
|
||||||
add_subdirectory(cocos/audio)
|
add_subdirectory(cocos/audio)
|
||||||
|
|
||||||
# cocos renderer library
|
|
||||||
add_subdirectory(cocos/renderer)
|
|
||||||
|
|
||||||
# cocos math library
|
|
||||||
add_subdirectory(cocos/math)
|
|
||||||
|
|
||||||
# cocos2d library
|
# cocos2d library
|
||||||
add_subdirectory(cocos/2d)
|
add_subdirectory(cocos)
|
||||||
|
|
||||||
# cocos base library
|
|
||||||
add_subdirectory(cocos/base)
|
|
||||||
|
|
||||||
if(BUILD_STORAGE)
|
|
||||||
# cocos storage
|
|
||||||
add_subdirectory(cocos/storage)
|
|
||||||
endif(BUILD_STORAGE)
|
|
||||||
|
|
||||||
if(BUILD_GUI)
|
|
||||||
# ui
|
|
||||||
add_subdirectory(cocos/ui)
|
|
||||||
endif(BUILD_GUI)
|
|
||||||
|
|
||||||
if(BUILD_NETWORK)
|
|
||||||
# network
|
|
||||||
add_subdirectory(cocos/network)
|
|
||||||
endif(BUILD_NETWORK)
|
|
||||||
|
|
||||||
if(BUILD_EXTENSIONS)
|
if(BUILD_EXTENSIONS)
|
||||||
# extensions
|
# extensions
|
||||||
|
|
|
@ -2,201 +2,117 @@ if(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
|
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
|
||||||
|
|
||||||
set(PLATFORM_SRC
|
set(COCOS_2D_PLATFORM_SRC
|
||||||
platform/win32/CCStdC.cpp
|
2d/platform/win32/CCStdC.cpp
|
||||||
platform/win32/CCFileUtilsWin32.cpp
|
2d/platform/win32/CCFileUtilsWin32.cpp
|
||||||
platform/win32/CCCommon.cpp
|
2d/platform/win32/CCCommon.cpp
|
||||||
platform/win32/CCApplication.cpp
|
2d/platform/win32/CCApplication.cpp
|
||||||
platform/desktop/CCGLView.cpp
|
2d/platform/desktop/CCGLView.cpp
|
||||||
platform/win32/CCDevice.cpp
|
2d/platform/win32/CCDevice.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
set(PLATFORM_SRC
|
set(COCOS_2D_PLATFORM_SRC
|
||||||
platform/linux/CCStdC.cpp
|
2d/platform/linux/CCStdC.cpp
|
||||||
platform/linux/CCFileUtilsLinux.cpp
|
2d/platform/linux/CCFileUtilsLinux.cpp
|
||||||
platform/linux/CCCommon.cpp
|
2d/platform/linux/CCCommon.cpp
|
||||||
platform/linux/CCApplication.cpp
|
2d/platform/linux/CCApplication.cpp
|
||||||
platform/desktop/CCGLView.cpp
|
2d/platform/desktop/CCGLView.cpp
|
||||||
platform/linux/CCDevice.cpp
|
2d/platform/linux/CCDevice.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(COCOS2D_SRC
|
set(COCOS_2D_SRC
|
||||||
CCAction.cpp
|
2d/CCActionCamera.cpp
|
||||||
CCActionCamera.cpp
|
2d/CCActionCatmullRom.cpp
|
||||||
CCActionCatmullRom.cpp
|
2d/CCAction.cpp
|
||||||
CCActionEase.cpp
|
2d/CCActionEase.cpp
|
||||||
CCActionGrid.cpp
|
2d/CCActionGrid3D.cpp
|
||||||
CCActionGrid3D.cpp
|
2d/CCActionGrid.cpp
|
||||||
CCActionInstant.cpp
|
2d/CCActionInstant.cpp
|
||||||
CCActionInterval.cpp
|
2d/CCActionInterval.cpp
|
||||||
CCActionManager.cpp
|
2d/CCActionManager.cpp
|
||||||
CCActionPageTurn3D.cpp
|
2d/CCActionPageTurn3D.cpp
|
||||||
CCActionProgressTimer.cpp
|
2d/CCActionProgressTimer.cpp
|
||||||
CCActionTiledGrid.cpp
|
2d/CCActionTiledGrid.cpp
|
||||||
CCActionTween.cpp
|
2d/CCActionTween.cpp
|
||||||
CCAnimation.cpp
|
2d/CCAnimationCache.cpp
|
||||||
CCAnimationCache.cpp
|
2d/CCAnimation.cpp
|
||||||
CCAtlasNode.cpp
|
2d/CCAtlasNode.cpp
|
||||||
CCClippingNode.cpp
|
2d/ccCArray.cpp
|
||||||
CCComponent.cpp
|
2d/CCClippingNode.cpp
|
||||||
CCComponentContainer.cpp
|
2d/CCComponentContainer.cpp
|
||||||
CCDrawNode.cpp
|
2d/CCComponent.cpp
|
||||||
CCDrawingPrimitives.cpp
|
2d/CCDrawingPrimitives.cpp
|
||||||
CCFont.cpp
|
2d/CCDrawNode.cpp
|
||||||
CCFontAtlas.cpp
|
2d/CCFontAtlasCache.cpp
|
||||||
CCFontAtlasCache.cpp
|
2d/CCFontAtlas.cpp
|
||||||
CCFontCharMap.cpp
|
2d/CCFontCharMap.cpp
|
||||||
CCFontFNT.cpp
|
2d/CCFont.cpp
|
||||||
CCFontFreeType.cpp
|
2d/CCFontFNT.cpp
|
||||||
CCGLBufferedNode.cpp
|
2d/CCFontFreeType.cpp
|
||||||
CCGLProgram.cpp
|
2d/CCGLBufferedNode.cpp
|
||||||
CCGrabber.cpp
|
2d/CCGLProgram.cpp
|
||||||
CCGrid.cpp
|
2d/ccGLStateCache.cpp
|
||||||
CCIMEDispatcher.cpp
|
2d/CCGrabber.cpp
|
||||||
CCLabel.cpp
|
2d/CCGrid.cpp
|
||||||
CCLabelAtlas.cpp
|
2d/CCIMEDispatcher.cpp
|
||||||
CCLabelBMFont.cpp
|
2d/CCLabelAtlas.cpp
|
||||||
CCLabelTTF.cpp
|
2d/CCLabelBMFont.cpp
|
||||||
CCLabelTextFormatter.cpp
|
2d/CCLabel.cpp
|
||||||
CCLayer.cpp
|
2d/CCLabelTextFormatter.cpp
|
||||||
CCMenu.cpp
|
2d/CCLabelTTF.cpp
|
||||||
CCMenuItem.cpp
|
2d/CCLayer.cpp
|
||||||
CCMotionStreak.cpp
|
2d/CCMenu.cpp
|
||||||
CCNode.cpp
|
2d/CCMenuItem.cpp
|
||||||
CCNodeGrid.cpp
|
2d/CCMotionStreak.cpp
|
||||||
CCParallaxNode.cpp
|
2d/CCNode.cpp
|
||||||
CCParticleBatchNode.cpp
|
2d/CCNodeGrid.cpp
|
||||||
CCParticleExamples.cpp
|
2d/CCParallaxNode.cpp
|
||||||
CCParticleSystem.cpp
|
2d/CCParticleBatchNode.cpp
|
||||||
CCParticleSystemQuad.cpp
|
2d/CCParticleExamples.cpp
|
||||||
CCProgressTimer.cpp
|
2d/CCParticleSystem.cpp
|
||||||
CCRenderTexture.cpp
|
2d/CCParticleSystemQuad.cpp
|
||||||
CCScene.cpp
|
2d/CCProgressTimer.cpp
|
||||||
CCScriptSupport.cpp
|
2d/CCRenderTexture.cpp
|
||||||
CCShaderCache.cpp
|
2d/CCScene.cpp
|
||||||
CCSprite.cpp
|
2d/CCScriptSupport.cpp
|
||||||
CCSpriteBatchNode.cpp
|
2d/CCShaderCache.cpp
|
||||||
CCSpriteFrame.cpp
|
2d/ccShaders.cpp
|
||||||
CCSpriteFrameCache.cpp
|
2d/CCSpriteBatchNode.cpp
|
||||||
CCTMXLayer.cpp
|
2d/CCSprite.cpp
|
||||||
CCTMXObjectGroup.cpp
|
2d/CCSpriteFrameCache.cpp
|
||||||
CCTMXTiledMap.cpp
|
2d/CCSpriteFrame.cpp
|
||||||
CCTMXXMLParser.cpp
|
2d/CCTextFieldTTF.cpp
|
||||||
CCTextFieldTTF.cpp
|
2d/CCTexture2D.cpp
|
||||||
CCTexture2D.cpp
|
2d/CCTextureAtlas.cpp
|
||||||
CCTextureAtlas.cpp
|
2d/CCTextureCache.cpp
|
||||||
CCTextureCache.cpp
|
2d/CCTileMapAtlas.cpp
|
||||||
CCTileMapAtlas.cpp
|
2d/CCTMXLayer.cpp
|
||||||
CCTransition.cpp
|
2d/CCTMXObjectGroup.cpp
|
||||||
CCTransitionPageTurn.cpp
|
2d/CCTMXTiledMap.cpp
|
||||||
CCTransitionProgress.cpp
|
2d/CCTMXXMLParser.cpp
|
||||||
CCTweenFunction.cpp
|
2d/CCTransition.cpp
|
||||||
CCUserDefault.cpp
|
2d/CCTransitionPageTurn.cpp
|
||||||
CCUserDefaultAndroid.cpp
|
2d/CCTransitionProgress.cpp
|
||||||
CCVertex.cpp
|
2d/CCTweenFunction.cpp
|
||||||
TGAlib.cpp
|
2d/CCUserDefaultAndroid.cpp
|
||||||
ccCArray.cpp
|
2d/CCUserDefault.cpp
|
||||||
ccGLStateCache.cpp
|
2d/ccUTF8.cpp
|
||||||
ccShaders.cpp
|
2d/ccUtils.cpp
|
||||||
ccUTF8.cpp
|
2d/CCVertex.cpp
|
||||||
ccUtils.cpp
|
2d/TGAlib.cpp
|
||||||
ccFPSImages.c
|
2d/platform/CCSAXParser.cpp
|
||||||
../cocos2d.cpp
|
2d/platform/CCThread.cpp
|
||||||
platform/CCSAXParser.cpp
|
2d/platform/CCGLViewProtocol.cpp
|
||||||
platform/CCThread.cpp
|
2d/platform/CCFileUtils.cpp
|
||||||
platform/CCGLViewProtocol.cpp
|
2d/platform/CCImage.cpp
|
||||||
platform/CCFileUtils.cpp
|
2d/ccFPSImages.c
|
||||||
platform/CCImage.cpp
|
../external/edtaa3func/edtaa3func.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"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
if(WIN32)
|
||||||
|
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
set(COCOS_SRC
|
||||||
|
cocos2d.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
include(2d/CMakeLists.txt)
|
||||||
|
include(physics/CMakeLists.txt)
|
||||||
|
include(math/CMakeLists.txt)
|
||||||
|
include(renderer/CMakeLists.txt)
|
||||||
|
include(base/CMakeLists.txt)
|
||||||
|
include(ui/CMakeLists.txt)
|
||||||
|
include(deprecated/CMakeLists.txt)
|
||||||
|
include(network/CMakeLists.txt)
|
||||||
|
include(storage/CMakeLists.txt)
|
||||||
|
|
||||||
|
add_library(cocos2d STATIC
|
||||||
|
${COCOS_SRC}
|
||||||
|
${COCOS_2D_SRC}
|
||||||
|
${COCOS_2D_PLATFORM_SRC}
|
||||||
|
${COCOS_BASE_SRC}
|
||||||
|
${COCOS_RENDERER_SRC}
|
||||||
|
${COCOS_MATH_SRC}
|
||||||
|
${COCOS_PHYSICS_SRC}
|
||||||
|
${COCOS_UI_SRC}
|
||||||
|
${COCOS_NETWORK_SRC}
|
||||||
|
${COCOS_STORAGE_SRC}
|
||||||
|
${COCOS_DEPRECATED_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
|
||||||
|
chipmunk_static
|
||||||
|
tinyxml2
|
||||||
|
unzip
|
||||||
|
xxhash
|
||||||
|
${COCOS_STORAGE_LINK}
|
||||||
|
${COCOS_NETWORK_LINK}
|
||||||
|
${COCOS_LINK}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(cocos2d
|
||||||
|
PROPERTIES
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||||
|
)
|
||||||
|
|
|
@ -1,62 +1,34 @@
|
||||||
set(COCOS_BASE_SRC
|
set(COCOS_BASE_SRC
|
||||||
../deprecated/CCSet.cpp
|
base/atitc.cpp
|
||||||
../deprecated/CCArray.cpp
|
base/base64.cpp
|
||||||
../deprecated/CCDictionary.cpp
|
base/CCAutoreleasePool.cpp
|
||||||
../deprecated/CCString.cpp
|
base/CCConfiguration.cpp
|
||||||
CCAutoreleasePool.cpp
|
base/CCConsole.cpp
|
||||||
CCAutoreleasePool.h
|
base/CCData.cpp
|
||||||
CCConfiguration.cpp
|
base/CCDataVisitor.cpp
|
||||||
CCConfiguration.h
|
base/CCDirector.cpp
|
||||||
CCConsole.cpp
|
base/CCEventAcceleration.cpp
|
||||||
CCConsole.h
|
base/CCEvent.cpp
|
||||||
CCData.cpp
|
base/CCEventCustom.cpp
|
||||||
CCData.h
|
base/CCEventDispatcher.cpp
|
||||||
CCDataVisitor.cpp
|
base/CCEventKeyboard.cpp
|
||||||
CCDataVisitor.h
|
base/CCEventListenerAcceleration.cpp
|
||||||
CCDirector.cpp
|
base/CCEventListener.cpp
|
||||||
CCDirector.h
|
base/CCEventListenerCustom.cpp
|
||||||
CCEvent.cpp
|
base/CCEventListenerKeyboard.cpp
|
||||||
CCEvent.h
|
base/CCEventListenerMouse.cpp
|
||||||
CCEventAcceleration.cpp
|
base/CCEventListenerTouch.cpp
|
||||||
CCEventAcceleration.h
|
base/CCEventMouse.cpp
|
||||||
CCEventCustom.cpp
|
base/CCEventTouch.cpp
|
||||||
CCEventDispatcher.cpp
|
base/CCNS.cpp
|
||||||
CCEventKeyboard.cpp
|
base/CCProfiling.cpp
|
||||||
CCEventListener.cpp
|
base/CCRef.cpp
|
||||||
CCEventListenerAcceleration.cpp
|
base/CCScheduler.cpp
|
||||||
CCEventListenerCustom.cpp
|
base/CCTouch.cpp
|
||||||
CCEventListenerKeyboard.cpp
|
base/ccTypes.cpp
|
||||||
CCEventListenerMouse.cpp
|
base/CCValue.cpp
|
||||||
CCEventListenerTouch.cpp
|
base/etc1.cpp
|
||||||
CCEventMouse.cpp
|
base/s3tc.cpp
|
||||||
CCEventTouch.cpp
|
base/ZipUtils.cpp
|
||||||
CCNS.cpp
|
|
||||||
CCProfiling.cpp
|
|
||||||
CCRef.cpp
|
|
||||||
CCScheduler.cpp
|
|
||||||
CCTouch.cpp
|
|
||||||
CCValue.cpp
|
|
||||||
ZipUtils.cpp
|
|
||||||
atitc.cpp
|
|
||||||
base64.cpp
|
|
||||||
ccTypes.cpp
|
|
||||||
etc1.cpp
|
|
||||||
s3tc.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(cocosbase STATIC
|
|
||||||
${COCOS_BASE_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
target_link_libraries(cocosbase
|
|
||||||
Ws2_32
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(cocosbase
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
set(COCOS_DEPRECATED_SRC
|
||||||
|
deprecated/CCArray.cpp
|
||||||
|
deprecated/CCDeprecated.cpp
|
||||||
|
deprecated/CCDictionary.cpp
|
||||||
|
deprecated/CCNotificationCenter.cpp
|
||||||
|
deprecated/CCSet.cpp
|
||||||
|
deprecated/CCString.cpp
|
||||||
|
)
|
||||||
|
|
|
@ -1,25 +1,12 @@
|
||||||
set(COCOS_MATH_SRC
|
set(COCOS_MATH_SRC
|
||||||
CCAffineTransform.cpp
|
math/CCAffineTransform.cpp
|
||||||
CCGeometry.cpp
|
math/CCGeometry.cpp
|
||||||
MathUtil.cpp
|
math/MathUtil.cpp
|
||||||
Matrix.cpp
|
math/Matrix.cpp
|
||||||
Quaternion.cpp
|
math/Quaternion.cpp
|
||||||
TransformUtils.cpp
|
math/TransformUtils.cpp
|
||||||
Vector2.cpp
|
math/Vector2.cpp
|
||||||
Vector3.cpp
|
math/Vector3.cpp
|
||||||
Vector4.cpp
|
math/Vector4.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(cocosmath STATIC
|
|
||||||
${COCOS_MATH_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
set_target_properties(cocosmath
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(PLATFORM_SRC
|
set(PLATFORM_SRC
|
||||||
WebSocket.cpp
|
network/WebSocket.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLATFORM_LINK
|
set(PLATFORM_LINK
|
||||||
|
@ -8,7 +8,7 @@ if(WIN32)
|
||||||
)
|
)
|
||||||
elseif(NOT APPLE)
|
elseif(NOT APPLE)
|
||||||
set(PLATFORM_SRC
|
set(PLATFORM_SRC
|
||||||
WebSocket.cpp
|
network/WebSocket.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLATFORM_LINK
|
set(PLATFORM_LINK
|
||||||
|
@ -18,24 +18,13 @@ elseif(NOT APPLE)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(NETWORK_SRC
|
set(COCOS_NETWORK_SRC
|
||||||
HttpClient.cpp
|
network/HttpClient.cpp
|
||||||
SocketIO.cpp
|
network/SocketIO.cpp
|
||||||
${PLATFORM_SRC}
|
${PLATFORM_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(network STATIC
|
set(COCOS_NETWORK_LINK
|
||||||
${NETWORK_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(network
|
|
||||||
curl
|
curl
|
||||||
${PLATFORM_LINK}
|
${PLATFORM_LINK}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(network
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
set(COCOS_PHYSICS_SRC
|
set(COCOS_PHYSICS_SRC
|
||||||
../physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp
|
physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp
|
||||||
../physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp
|
physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp
|
||||||
../physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp
|
physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp
|
||||||
../physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp
|
physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp
|
||||||
../physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp
|
physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp
|
||||||
../physics/CCPhysicsBody.cpp
|
physics/CCPhysicsBody.cpp
|
||||||
../physics/CCPhysicsContact.cpp
|
physics/CCPhysicsContact.cpp
|
||||||
../physics/CCPhysicsShape.cpp
|
physics/CCPhysicsShape.cpp
|
||||||
../physics/CCPhysicsJoint.cpp
|
physics/CCPhysicsJoint.cpp
|
||||||
../physics/CCPhysicsWorld.cpp
|
physics/CCPhysicsWorld.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,9 @@
|
||||||
set(COCOS_RENDERER_SRC
|
set(COCOS_RENDERER_SRC
|
||||||
CCBatchCommand.cpp
|
renderer/CCBatchCommand.cpp
|
||||||
CCCustomCommand.cpp
|
renderer/CCCustomCommand.cpp
|
||||||
CCGroupCommand.cpp
|
renderer/CCGroupCommand.cpp
|
||||||
CCQuadCommand.cpp
|
renderer/CCQuadCommand.cpp
|
||||||
CCRenderCommand.cpp
|
renderer/CCRenderCommand.cpp
|
||||||
CCRenderer.cpp
|
renderer/CCRenderer.cpp
|
||||||
)
|
|
||||||
|
|
||||||
add_library(cocosrenderer STATIC
|
|
||||||
${COCOS_RENDERER_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(cocosrenderer
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
|
|
||||||
SET(STORAGE_SOURCES
|
set(COCOS_STORAGE_SRC
|
||||||
local-storage/LocalStorage.cpp
|
storage/local-storage/LocalStorage.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(storage STATIC
|
set(COCOS_STORAGE_LINK
|
||||||
${STORAGE_SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(storage
|
|
||||||
sqlite3
|
sqlite3
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(storage
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,35 +1,26 @@
|
||||||
set(GUI_SRC
|
set(COCOS_UI_SRC
|
||||||
UIWidget.cpp
|
ui/CCProtectedNode.cpp
|
||||||
UILayout.cpp
|
ui/CocosGUI.cpp
|
||||||
UILayoutParameter.cpp
|
ui/UIButton.cpp
|
||||||
UILayoutDefine.cpp
|
ui/UICheckBox.cpp
|
||||||
CocosGUI.cpp
|
ui/UIHBox.cpp
|
||||||
UIHelper.cpp
|
ui/UIHelper.cpp
|
||||||
UIListView.cpp
|
ui/UIImageView.cpp
|
||||||
UIPageView.cpp
|
ui/UILayout.cpp
|
||||||
UIScrollView.cpp
|
ui/UILayoutDefine.cpp
|
||||||
UIButton.cpp
|
ui/UILayoutParameter.cpp
|
||||||
UICheckBox.cpp
|
ui/UIListView.cpp
|
||||||
UIImageView.cpp
|
ui/UILoadingBar.cpp
|
||||||
UIText.cpp
|
ui/UIPageView.cpp
|
||||||
UITextAtlas.cpp
|
ui/UIRelativeBox.cpp
|
||||||
UITextBMFont.cpp
|
ui/UIRichText.cpp
|
||||||
UILoadingBar.cpp
|
ui/UIScrollView.cpp
|
||||||
UISlider.cpp
|
ui/UISlider.cpp
|
||||||
UITextField.cpp
|
ui/UITextAtlas.cpp
|
||||||
UIRichText.cpp
|
ui/UITextBMFont.cpp
|
||||||
CCProtectedNode.cpp
|
ui/UIText.cpp
|
||||||
UIHBox.cpp
|
ui/UITextField.cpp
|
||||||
UIVBox.cpp
|
ui/UIVBox.cpp
|
||||||
UIRelativeBox.cpp
|
ui/UIWidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(ui STATIC
|
|
||||||
${GUI_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(ui
|
|
||||||
PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
|
|
|
@ -193,8 +193,6 @@ add_executable(${APP_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${APP_NAME}
|
target_link_libraries(${APP_NAME}
|
||||||
ui
|
|
||||||
network
|
|
||||||
spine
|
spine
|
||||||
cocostudio
|
cocostudio
|
||||||
cocosbuilder
|
cocosbuilder
|
||||||
|
|
|
@ -19,8 +19,6 @@ add_executable(${APP_NAME}
|
||||||
|
|
||||||
target_link_libraries(${APP_NAME}
|
target_link_libraries(${APP_NAME}
|
||||||
luabinding
|
luabinding
|
||||||
ui
|
|
||||||
network
|
|
||||||
cocostudio
|
cocostudio
|
||||||
cocosbuilder
|
cocosbuilder
|
||||||
extensions
|
extensions
|
||||||
|
|
|
@ -20,8 +20,6 @@ add_executable(${APP_NAME}
|
||||||
|
|
||||||
target_link_libraries(${APP_NAME}
|
target_link_libraries(${APP_NAME}
|
||||||
luabinding
|
luabinding
|
||||||
ui
|
|
||||||
network
|
|
||||||
cocostudio
|
cocostudio
|
||||||
cocosbuilder
|
cocosbuilder
|
||||||
extensions
|
extensions
|
||||||
|
|
Loading…
Reference in New Issue