2014-08-24 18:52:51 +08:00
|
|
|
#/****************************************************************************
|
|
|
|
# Copyright (c) 2013 cocos2d-x.org
|
|
|
|
# Copyright (c) 2014 martell malone
|
2017-02-14 14:36:57 +08:00
|
|
|
# Copyright (c) 2015-2017 Chukong Technologies Inc.
|
2014-08-24 18:52:51 +08:00
|
|
|
#
|
|
|
|
# http://www.cocos2d-x.org
|
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
2014-05-02 04:01:51 +08:00
|
|
|
|
2014-08-24 18:52:51 +08:00
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
# all copies or substantial portions of the Software.
|
2014-05-02 04:01:51 +08:00
|
|
|
|
2014-08-24 18:52:51 +08:00
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
# THE SOFTWARE.
|
|
|
|
# ****************************************************************************/
|
2014-05-02 04:01:51 +08:00
|
|
|
|
2018-02-08 09:24:33 +08:00
|
|
|
# this CMakeLists is to generate Cocos2d-x Engine Library
|
|
|
|
# build libcocos2d
|
|
|
|
# build luacocos2d if BUILD_LUA_LIBS=ON
|
|
|
|
# build jscocos2d if BUILD_JS_LIBS=ON
|
2014-08-24 18:52:51 +08:00
|
|
|
|
2018-02-08 09:24:33 +08:00
|
|
|
# The version number
|
|
|
|
set(COCOS2D_X_VERSION 3.17)
|
|
|
|
|
|
|
|
set(COCOS_CORE_LIB cocos2d)
|
2014-10-15 05:19:29 +08:00
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
if(WINDOWS)
|
2018-05-02 15:33:01 +08:00
|
|
|
add_definitions(-DUNICODE -D_UNICODE)
|
2014-09-10 03:18:31 +08:00
|
|
|
endif()
|
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
include(2d/CMakeLists.txt)
|
|
|
|
include(3d/CMakeLists.txt)
|
|
|
|
include(platform/CMakeLists.txt)
|
|
|
|
include(physics/CMakeLists.txt)
|
2015-05-08 15:49:33 +08:00
|
|
|
include(physics3d/CMakeLists.txt)
|
2014-09-17 11:23:59 +08:00
|
|
|
include(math/CMakeLists.txt)
|
2015-05-29 16:45:33 +08:00
|
|
|
include(navmesh/CMakeLists.txt)
|
2014-09-17 11:23:59 +08:00
|
|
|
include(renderer/CMakeLists.txt)
|
2016-06-16 02:33:25 +08:00
|
|
|
include(vr/CMakeLists.txt)
|
2014-09-17 11:23:59 +08:00
|
|
|
include(base/CMakeLists.txt)
|
|
|
|
include(deprecated/CMakeLists.txt)
|
|
|
|
include(ui/CMakeLists.txt)
|
|
|
|
include(network/CMakeLists.txt)
|
|
|
|
include(audio/CMakeLists.txt)
|
|
|
|
include(storage/CMakeLists.txt)
|
|
|
|
|
2014-11-14 07:25:21 +08:00
|
|
|
if(BUILD_EDITOR_COCOSBUILDER)
|
2018-03-14 13:51:29 +08:00
|
|
|
include(editor-support/cocosbuilder/CMakeLists.txt)
|
|
|
|
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_CCB_SRC} ${COCOS_CCB_HEADER})
|
2014-11-14 07:25:21 +08:00
|
|
|
endif(BUILD_EDITOR_COCOSBUILDER)
|
|
|
|
|
|
|
|
if(BUILD_EDITOR_COCOSTUDIO)
|
2018-03-14 13:51:29 +08:00
|
|
|
include(editor-support/cocostudio/CMakeLists.txt)
|
|
|
|
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_CS_SRC} ${COCOS_CS_HEADER})
|
2014-11-14 07:25:21 +08:00
|
|
|
endif(BUILD_EDITOR_COCOSTUDIO)
|
|
|
|
|
|
|
|
if(BUILD_EDITOR_SPINE)
|
2018-05-02 15:33:01 +08:00
|
|
|
include(editor-support/spine/CMakeLists.txt)
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_SPINE_SRC} ${COCOS_SPINE_HEADER})
|
2014-11-14 07:25:21 +08:00
|
|
|
endif(BUILD_EDITOR_SPINE)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
2018-02-08 09:24:33 +08:00
|
|
|
if(BUILD_EXTENSIONS)
|
2018-05-02 15:33:01 +08:00
|
|
|
include(../extensions/CMakeLists.txt)
|
2018-02-08 09:24:33 +08:00
|
|
|
endif(BUILD_EXTENSIONS)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_HEADER cocos2d.h
|
|
|
|
${COCOS_2D_HEADER}
|
|
|
|
${COCOS_3D_HEADER}
|
|
|
|
${COCOS_PLATFORM_HEADER}
|
|
|
|
${COCOS_PHYSICS_HEADER}
|
|
|
|
${COCOS_PHYSICS3D_HEADER}
|
|
|
|
${COCOS_MATH_HEADER}
|
|
|
|
${COCOS_NAVMESH_HEADER}
|
|
|
|
${COCOS_RENDERER_HEADER}
|
|
|
|
${COCOS_VR_HEADER}
|
|
|
|
${COCOS_BASE_HEADER}
|
|
|
|
${COCOS_AUDIO_HEADER}
|
|
|
|
${COCOS_UI_HEADER}
|
|
|
|
${COCOS_DEPRECATED_HEADER}
|
|
|
|
${COCOS_NETWORK_HEADER}
|
|
|
|
${COCOS_EDITOR_SUPPORT_HEADER}
|
|
|
|
${COCOS_EXTENSIONS_HEADER}
|
|
|
|
${COCOS_STORAGE_HEADER}
|
2018-05-02 15:33:01 +08:00
|
|
|
)
|
2018-03-14 13:51:29 +08:00
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
set(COCOS_SRC cocos2d.cpp
|
|
|
|
${COCOS_2D_SRC}
|
|
|
|
${COCOS_3D_SRC}
|
|
|
|
${COCOS_PLATFORM_SRC}
|
|
|
|
${COCOS_PHYSICS_SRC}
|
2015-05-08 15:49:33 +08:00
|
|
|
${COCOS_PHYSICS3D_SRC}
|
2014-09-17 11:23:59 +08:00
|
|
|
${COCOS_MATH_SRC}
|
2015-05-29 16:45:33 +08:00
|
|
|
${COCOS_NAVMESH_SRC}
|
2014-09-17 11:23:59 +08:00
|
|
|
${COCOS_RENDERER_SRC}
|
2016-06-16 02:33:25 +08:00
|
|
|
${COCOS_VR_SRC}
|
2014-09-17 11:23:59 +08:00
|
|
|
${COCOS_BASE_SRC}
|
|
|
|
${COCOS_AUDIO_SRC}
|
|
|
|
${COCOS_UI_SRC}
|
2014-09-27 16:55:41 +08:00
|
|
|
${COCOS_DEPRECATED_SRC}
|
2014-09-17 11:23:59 +08:00
|
|
|
${COCOS_NETWORK_SRC}
|
2014-09-18 02:50:59 +08:00
|
|
|
${COCOS_EDITOR_SUPPORT_SRC}
|
|
|
|
${COCOS_EXTENSIONS_SRC}
|
2018-02-08 09:24:33 +08:00
|
|
|
${COCOS_STORAGE_SRC}
|
2018-05-02 15:33:01 +08:00
|
|
|
)
|
2018-03-14 13:51:29 +08:00
|
|
|
|
|
|
|
#todo: provide prebuild versions of the xx libs for all platforms
|
|
|
|
include_directories(../external/xxtea)
|
|
|
|
include_directories(../external/clipper)
|
2014-09-10 03:18:31 +08:00
|
|
|
|
2018-03-14 13:51:29 +08:00
|
|
|
list(APPEND COCOS_SRC ${COCOS_HEADER})
|
2014-09-20 00:56:51 +08:00
|
|
|
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
add_library(cocos2d ${COCOS_SRC})
|
2014-09-20 00:56:51 +08:00
|
|
|
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
# use necessary external libs and system libs
|
|
|
|
include(CocosUseLibs)
|
|
|
|
target_use_cocos2d_depend_libs(cocos2d)
|
|
|
|
|
|
|
|
set_target_properties(cocos2d
|
2018-05-02 15:33:01 +08:00
|
|
|
PROPERTIES
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
VERSION "${COCOS2D_X_VERSION}"
|
|
|
|
FOLDER "Internal"
|
|
|
|
)
|
2015-10-23 07:12:37 +08:00
|
|
|
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
# set custom target: prebuilt, to copy all libs to prebuilt libs folder
|
|
|
|
if(GEN_COCOS_PREBUILT)
|
|
|
|
add_custom_target(prebuilt ALL)
|
|
|
|
add_dependencies(prebuilt cocos2d)
|
|
|
|
set_target_properties(prebuilt
|
2018-05-02 15:33:01 +08:00
|
|
|
PROPERTIES
|
|
|
|
FOLDER "Internal"
|
|
|
|
)
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
add_custom_command(TARGET "prebuilt"
|
2018-05-02 15:33:01 +08:00
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${CMAKE_BINARY_DIR}/lib"
|
|
|
|
"${COCOS_PREBUILT_PATH}"
|
|
|
|
COMMENT "copy library directory:${CMAKE_BINARY_DIR}/lib to directory:${COCOS_PREBUILT_PATH}"
|
|
|
|
)
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
if(BUILD_LUA_LIBS)
|
|
|
|
add_dependencies(prebuilt luacocos2d)
|
|
|
|
endif()
|
|
|
|
if(BUILD_JS_LIBS)
|
|
|
|
add_dependencies(prebuilt jscocos2d)
|
|
|
|
endif()
|
2018-03-14 13:51:29 +08:00
|
|
|
if(BUILD_SIMU_LIB AND (MACOSX OR WINDOWS))
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
add_dependencies(prebuilt simulator)
|
|
|
|
endif()
|
2018-02-08 09:24:33 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
## Lua bindings lib
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
if(BUILD_LUA_LIBS)
|
2018-05-02 15:33:01 +08:00
|
|
|
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/scripting/lua-bindings ${ENGINE_BINARY_PATH}/cocos/lua-bindings)
|
2018-02-08 09:24:33 +08:00
|
|
|
endif()
|
|
|
|
## JS bindings lib
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
if(BUILD_JS_LIBS)
|
2018-05-02 15:33:01 +08:00
|
|
|
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/scripting/js-bindings ${ENGINE_BINARY_PATH}/cocos/js-bindings)
|
2018-02-08 09:24:33 +08:00
|
|
|
endif()
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
# simulator
|
2018-03-14 13:51:29 +08:00
|
|
|
if(BUILD_SIMU_LIB AND (MACOSX OR WINDOWS))
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
add_subdirectory(${COCOS2DX_ROOT_PATH}/tools/simulator/libsimulator ${ENGINE_BINARY_PATH}/cocos/libsimulator)
|
|
|
|
endif()
|
2018-02-08 09:24:33 +08:00
|
|
|
|
|
|
|
if(XCODE OR VS)
|
cmake support win32 ,and support generate&use prebuilt libs (#18683)
* fix win32 prebuilt error, and set cmake as default android native build
* cpp-template support msvc
* add msvc version check
* add -D_USRLUASTATIC, fix lua lib cmake compile error
* fix cpp-empty-test res copy dir, add function needed
* improve msvc res copy
* refactor cmake copy dll logic
* fix cpp-tests compile error
* refactor copy dll temp
* refactor win32 exe using dlls
* js-project compile support cmake using msvc
* improve res mark for win32
* update the way of lua project res mark
* add D_USRLUASTATIC for lua project
* unify RELEASE Release to Release, add CMAKE_CONFIGURATION_TYPES
* improve VS shows targets, add folder
* improve mac/ios res mark
* reduce useless comments
* unify cpp src include variable
* refactor cpp test project package logic
* improve pkg app logic
* start support prebuilt libs for cpp project using cmake
* improve prebuilt libs generate
* expand js/lua support prebuilt libs on mac
* adapt IDE generate libs path
* start do prebuilt for android
* improve the way of using external libs for prebuilt
* prebuilt libs support cpp-empty-test on android studio
* cpp-tests prebuilt libs, and remove useless
* start to improve libs using, to adapt prebuilt
* improve cpp tests prebuilt on android
* prebuilt support lua & js test on android
* prebuilt support cpp&js template
* rename prebuilt variabl, detail androd config
* finish android support prebuilt using cmake
* fix cmake script run in windows error
* reduce variable name length
* improve the way of win32 use dlls to adapt prebuilt
* loosen pick js/lua engine lib condition
* self review and start check linux build
* unify compile option location
* strict copy dlls condition
* improve libs link order
* start redo the way of copy dlls
* unify dlls copy logic
* fix linux res copy error
* update cmake copy file path in linux
* make prebuilt dir if needed, and divide Debug and Release dir
* cmake win32 divide Debug and Release dir well
* comment Lua Template project, for the unfinished lua simulator support
* add simulator cmake file
* start support simulator
* simulator support cmake build on macOS
* fix simulator compile error on win32
* add simulator prebuilt support
* improve mark cocos app macro
* improve cmake template project format
* improve cmake app files format
* fix format improve mistake
* detail cmake readme
* improve readme, useless comments
* add game.rc to template project
* check travis openssl version
* try update travis openssl
* upgrade travis openssl
* change openssl link
* change to upgrade openssl
* re install python with upgrade openssl
* add comment for macro and func, improve variable name
2018-03-08 09:47:57 +08:00
|
|
|
cocos_mark_code_files("cocos2d")
|
|
|
|
endif()
|