mirror of https://github.com/axmolengine/axmol.git
extract ui,network and storage from cocos2d module and adjust relate CMakeLists.txt
This commit is contained in:
parent
497847f7e8
commit
aa4f407851
|
@ -229,6 +229,15 @@ add_subdirectory(cocos/audio)
|
|||
# cocos2d library
|
||||
add_subdirectory(cocos)
|
||||
|
||||
# network library
|
||||
add_subdirectory(cocos/network)
|
||||
|
||||
# ui library
|
||||
add_subdirectory(cocos/ui)
|
||||
|
||||
# sqlite3 library
|
||||
add_subdirectory(cocos/storage)
|
||||
|
||||
if(BUILD_EXTENSIONS)
|
||||
# extensions
|
||||
add_subdirectory(extensions)
|
||||
|
|
|
@ -14,10 +14,7 @@ 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}
|
||||
|
@ -28,9 +25,6 @@ add_library(cocos2d STATIC
|
|||
${COCOS_RENDERER_SRC}
|
||||
${COCOS_MATH_SRC}
|
||||
${COCOS_PHYSICS_SRC}
|
||||
${COCOS_UI_SRC}
|
||||
${COCOS_NETWORK_SRC}
|
||||
${COCOS_STORAGE_SRC}
|
||||
${COCOS_DEPRECATED_SRC}
|
||||
)
|
||||
|
||||
|
@ -95,8 +89,6 @@ target_link_libraries(cocos2d
|
|||
tinyxml2
|
||||
unzip
|
||||
xxhash
|
||||
${COCOS_STORAGE_LINK}
|
||||
${COCOS_NETWORK_LINK}
|
||||
${COCOS_LINK}
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if(WIN32)
|
||||
set(PLATFORM_SRC
|
||||
network/WebSocket.cpp
|
||||
WebSocket.cpp
|
||||
)
|
||||
|
||||
set(PLATFORM_LINK
|
||||
|
@ -8,7 +8,7 @@ if(WIN32)
|
|||
)
|
||||
elseif(NOT APPLE)
|
||||
set(PLATFORM_SRC
|
||||
network/WebSocket.cpp
|
||||
WebSocket.cpp
|
||||
)
|
||||
|
||||
set(PLATFORM_LINK
|
||||
|
@ -19,11 +19,15 @@ elseif(NOT APPLE)
|
|||
endif()
|
||||
|
||||
set(COCOS_NETWORK_SRC
|
||||
network/HttpClient.cpp
|
||||
network/SocketIO.cpp
|
||||
HttpClient.cpp
|
||||
SocketIO.cpp
|
||||
${PLATFORM_SRC}
|
||||
)
|
||||
|
||||
add_library(network STATIC
|
||||
${COCOS_NETWORK_SRC}
|
||||
)
|
||||
|
||||
IF (WIN32 AND NOT MINGW)
|
||||
set(COCOS_NETWORK_LINK
|
||||
libcurl_imp
|
||||
|
@ -35,3 +39,13 @@ ELSE()
|
|||
${PLATFORM_LINK}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
target_link_libraries(network
|
||||
${COCOS_NETWORK_LINK}
|
||||
)
|
||||
|
||||
set_target_properties(network
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
|
||||
set(COCOS_STORAGE_SRC
|
||||
storage/local-storage/LocalStorage.cpp
|
||||
local-storage/LocalStorage.cpp
|
||||
)
|
||||
|
||||
set(COCOS_STORAGE_LINK
|
||||
sqlite3
|
||||
add_library(sqlite3 STATIC
|
||||
${COCOS_STORAGE_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(sqlite3
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,27 +1,47 @@
|
|||
set(COCOS_UI_SRC
|
||||
ui/CocosGUI.cpp
|
||||
ui/UIButton.cpp
|
||||
ui/UICheckBox.cpp
|
||||
ui/UIHBox.cpp
|
||||
ui/UIHelper.cpp
|
||||
ui/UIImageView.cpp
|
||||
ui/UILayout.cpp
|
||||
ui/UILayoutParameter.cpp
|
||||
ui/UILayoutManager.cpp
|
||||
ui/UIListView.cpp
|
||||
ui/UILoadingBar.cpp
|
||||
ui/UIPageView.cpp
|
||||
ui/UIRelativeBox.cpp
|
||||
ui/UIRichText.cpp
|
||||
ui/UIScrollView.cpp
|
||||
ui/UISlider.cpp
|
||||
ui/UITextAtlas.cpp
|
||||
ui/UITextBMFont.cpp
|
||||
ui/UIText.cpp
|
||||
ui/UITextField.cpp
|
||||
ui/UIVBox.cpp
|
||||
ui/UIWidget.cpp
|
||||
ui/UIDeprecated.cpp
|
||||
ui/UIScale9Sprite.cpp
|
||||
CocosGUI.cpp
|
||||
UIButton.cpp
|
||||
UICheckBox.cpp
|
||||
UIHBox.cpp
|
||||
UIHelper.cpp
|
||||
UIImageView.cpp
|
||||
UILayout.cpp
|
||||
UILayoutParameter.cpp
|
||||
UILayoutManager.cpp
|
||||
UIListView.cpp
|
||||
UILoadingBar.cpp
|
||||
UIPageView.cpp
|
||||
UIRelativeBox.cpp
|
||||
UIRichText.cpp
|
||||
UIScrollView.cpp
|
||||
UISlider.cpp
|
||||
UITextAtlas.cpp
|
||||
UITextBMFont.cpp
|
||||
UIText.cpp
|
||||
UITextField.cpp
|
||||
UIVBox.cpp
|
||||
UIWidget.cpp
|
||||
UIDeprecated.cpp
|
||||
UIScale9Sprite.cpp
|
||||
)
|
||||
|
||||
include_directories(
|
||||
ui
|
||||
../../base
|
||||
)
|
||||
|
||||
|
||||
add_library(ui STATIC
|
||||
${COCOS_UI_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(ui
|
||||
cocos2d
|
||||
)
|
||||
|
||||
set_target_properties(ui
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -148,11 +148,9 @@ set(FMOD_LIB "fmodex")
|
|||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME}
|
||||
luabinding
|
||||
spine
|
||||
cocostudio
|
||||
cocosbuilder
|
||||
extensions
|
||||
luacocos2d
|
||||
luacocosdenshion
|
||||
luanetwork
|
||||
audio
|
||||
cocos2d
|
||||
xxtea
|
||||
|
|
|
@ -206,6 +206,9 @@ target_link_libraries(${APP_NAME}
|
|||
audio
|
||||
cocos2d
|
||||
box2d
|
||||
ui
|
||||
network
|
||||
sqlite3
|
||||
)
|
||||
|
||||
set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
||||
|
|
|
@ -7,7 +7,7 @@ set(SAMPLE_SRC
|
|||
|
||||
include_directories(
|
||||
Classes
|
||||
../../../cocos/scripting/lua/bindings
|
||||
../../../cocos/scripting/lua-bindings
|
||||
../../../external/lua/lua
|
||||
../../../external/lua/tolua
|
||||
)
|
||||
|
@ -23,6 +23,7 @@ target_link_libraries(${APP_NAME}
|
|||
luanetwork
|
||||
audio
|
||||
cocos2d
|
||||
network
|
||||
)
|
||||
|
||||
set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
||||
|
|
|
@ -33,6 +33,8 @@ target_link_libraries(${APP_NAME}
|
|||
spine
|
||||
cocosbuilder
|
||||
extensions
|
||||
ui
|
||||
network
|
||||
)
|
||||
|
||||
set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
||||
|
|
Loading…
Reference in New Issue