Linux local storage support. Depends on libsqlite3-dev

This commit is contained in:
Éloi Rivard 2014-02-11 15:10:42 +01:00
parent c13a38e42f
commit 3fb2b61591
6 changed files with 35 additions and 1 deletions

View File

@ -40,6 +40,7 @@ option(DEBUG_MODE "Debug or release?" ON)
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_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
@ -56,6 +57,7 @@ option(DEBUG_MODE "Debug or release?" 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_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
@ -236,6 +238,11 @@ add_subdirectory(cocos/base)
# cocos 2d library
add_subdirectory(cocos/2d)
if(BUILD_STORAGE)
# cocos storage
add_subdirectory(cocos/storage)
endif(BUILD_STORAGE)
if(BUILD_GUI)
# gui
add_subdirectory(cocos/gui)

View File

@ -15,6 +15,7 @@ DEPENDS+=' libcurl4-gnutls-dev'
DEPENDS+=' libfontconfig1-dev'
DEPENDS+=' libsqlite3-dev'
DEPENDS+=' libglew*-dev'
DEPENDS+=' libsqlite3-dev'
MISSING=
echo "Checking for missing packages ..."

View File

@ -0,0 +1,18 @@
SET(STORAGE_SOURCES
local-storage/LocalStorage.cpp
)
add_library(storage STATIC
${STORAGE_SOURCES}
)
target_link_libraries(storage
sqlite3
)
set_target_properties(storage
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)

View File

@ -107,6 +107,9 @@ add_subdirectory(${COCOS2D_ROOT}/cocos/base)
# cocos 2d library
add_subdirectory(${COCOS2D_ROOT}/cocos/2d)
# cocos storage
add_subdirectory(${COCOS2D_ROOT}/cocos/storage)
# gui
add_subdirectory(${COCOS2D_ROOT}/cocos/gui)
@ -141,6 +144,7 @@ endif()
target_link_libraries(${APP_NAME}
gui
network
storage
spine
cocostudio
cocosbuilder

View File

@ -110,6 +110,9 @@ add_subdirectory(${COCOS2D_ROOT}/cocos/base)
# cocos 2d library
add_subdirectory(${COCOS2D_ROOT}/cocos/2d)
# cocos storage
add_subdirectory(${COCOS2D_ROOT}/cocos/storage)
# gui
add_subdirectory(${COCOS2D_ROOT}/cocos/gui)
@ -155,6 +158,7 @@ target_link_libraries(${APP_NAME}
luabinding
gui
network
storage
spine
cocostudio
cocosbuilder

View File

@ -1 +1 @@
badb55806c84be4b033ccebcf87094b30be56f97
ec85131211699eaf03b6fe2544cd8686ef283b41