axmol/CMakeLists.txt

49 lines
1.9 KiB
CMake
Raw Normal View History

#/****************************************************************************
# Copyright (c) 2013 cocos2d-x.org
2014-08-06 22:43:19 +08:00
# Copyright (c) 2014 martell malone
# Copyright (c) 2015-2017 Chukong Technologies Inc.
2014-08-06 22:43:19 +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:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 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.
# ****************************************************************************/
V3 android cmake support, add mac/ios support (#18646) * CMake build improvements * android cmake support * Enable proguard for cocos2d * examples & test cmake support * add android build type param to gradle.properties file * less warnings * update all android configs to recomended settings * fix network cmake error * fix js-tests cmake error * android build config, add cmake * android build config, add cmake * add lua share lib * android lua cmake build fix * fix * luajit test * run fail, still * fix js-warning * correct lua main include * lua test project cmake support android * try to add lua-template cmake support * lua template fix * js_tests support cmake on android * js-tests improve * cmake support js-template * test to realise prebuild * cmake improve, no feature * improve templates cmake * refactor cmake struct * correct cpp-tests cmake * cpp-templates cmake improve * typo fix * cmake struct refator * change default option * adapt new project struct * uniform cmake test style * add_dependencies to support make -j * little struct improve * little fix * adapt cmake bin dir * little improve about cmake version * change build all tests condition * add source_group for Xcode * add mark source files * add more mark source code * add template project to test * add macos info.plist template * add pak macos for all project * lua test icon fix * not consider lua project for now * modify pak method * add another ios toolchain * add ios system library * update ios toolchain, and reduce ios compile errors * reduce error * make ios engine lib compile pass * cpp-empty-test ios bundle * cpp-tests ios support * js-tests ios support * templates project support ios * fix the way of lua-tests package * try to fix lua-template on macOS * comment lua-template sim file * improve display on xcode * update cmake readme * check android compile again * fix android compile error * fix linux cmake res error * update deps version, for cmake * fix lua_template linux compile error * close android cmake support for now * review template android share library name * change PROP_BUILD_TOOLS_VERSION version to 27.0.1 * change android compile version * make `PROP_APP_PLATFORM` back, add comments for android native build * Revert "make `PROP_APP_PLATFORM` back, add comments for android native build" This reverts commit 272ddc19886891b9502cde070753a870c0fdb588.
2018-02-08 09:24:33 +08:00
# build engine library and all tests
2013-11-30 14:09:12 +08:00
cmake_minimum_required(VERSION 3.6)
Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
2016-03-03 08:51:54 +08:00
V3 android cmake support, add mac/ios support (#18646) * CMake build improvements * android cmake support * Enable proguard for cocos2d * examples & test cmake support * add android build type param to gradle.properties file * less warnings * update all android configs to recomended settings * fix network cmake error * fix js-tests cmake error * android build config, add cmake * android build config, add cmake * add lua share lib * android lua cmake build fix * fix * luajit test * run fail, still * fix js-warning * correct lua main include * lua test project cmake support android * try to add lua-template cmake support * lua template fix * js_tests support cmake on android * js-tests improve * cmake support js-template * test to realise prebuild * cmake improve, no feature * improve templates cmake * refactor cmake struct * correct cpp-tests cmake * cpp-templates cmake improve * typo fix * cmake struct refator * change default option * adapt new project struct * uniform cmake test style * add_dependencies to support make -j * little struct improve * little fix * adapt cmake bin dir * little improve about cmake version * change build all tests condition * add source_group for Xcode * add mark source files * add more mark source code * add template project to test * add macos info.plist template * add pak macos for all project * lua test icon fix * not consider lua project for now * modify pak method * add another ios toolchain * add ios system library * update ios toolchain, and reduce ios compile errors * reduce error * make ios engine lib compile pass * cpp-empty-test ios bundle * cpp-tests ios support * js-tests ios support * templates project support ios * fix the way of lua-tests package * try to fix lua-template on macOS * comment lua-template sim file * improve display on xcode * update cmake readme * check android compile again * fix android compile error * fix linux cmake res error * update deps version, for cmake * fix lua_template linux compile error * close android cmake support for now * review template android share library name * change PROP_BUILD_TOOLS_VERSION version to 27.0.1 * change android compile version * make `PROP_APP_PLATFORM` back, add comments for android native build * Revert "make `PROP_APP_PLATFORM` back, add comments for android native build" This reverts commit 272ddc19886891b9502cde070753a870c0fdb588.
2018-02-08 09:24:33 +08:00
project(Cocos2d-x)
V3 android cmake support, add mac/ios support (#18646) * CMake build improvements * android cmake support * Enable proguard for cocos2d * examples & test cmake support * add android build type param to gradle.properties file * less warnings * update all android configs to recomended settings * fix network cmake error * fix js-tests cmake error * android build config, add cmake * android build config, add cmake * add lua share lib * android lua cmake build fix * fix * luajit test * run fail, still * fix js-warning * correct lua main include * lua test project cmake support android * try to add lua-template cmake support * lua template fix * js_tests support cmake on android * js-tests improve * cmake support js-template * test to realise prebuild * cmake improve, no feature * improve templates cmake * refactor cmake struct * correct cpp-tests cmake * cpp-templates cmake improve * typo fix * cmake struct refator * change default option * adapt new project struct * uniform cmake test style * add_dependencies to support make -j * little struct improve * little fix * adapt cmake bin dir * little improve about cmake version * change build all tests condition * add source_group for Xcode * add mark source files * add more mark source code * add template project to test * add macos info.plist template * add pak macos for all project * lua test icon fix * not consider lua project for now * modify pak method * add another ios toolchain * add ios system library * update ios toolchain, and reduce ios compile errors * reduce error * make ios engine lib compile pass * cpp-empty-test ios bundle * cpp-tests ios support * js-tests ios support * templates project support ios * fix the way of lua-tests package * try to fix lua-template on macOS * comment lua-template sim file * improve display on xcode * update cmake readme * check android compile again * fix android compile error * fix linux cmake res error * update deps version, for cmake * fix lua_template linux compile error * close android cmake support for now * review template android share library name * change PROP_BUILD_TOOLS_VERSION version to 27.0.1 * change android compile version * make `PROP_APP_PLATFORM` back, add comments for android native build * Revert "make `PROP_APP_PLATFORM` back, add comments for android native build" This reverts commit 272ddc19886891b9502cde070753a870c0fdb588.
2018-02-08 09:24:33 +08:00
# cocos2dx root path
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
V3 android cmake support, add mac/ios support (#18646) * CMake build improvements * android cmake support * Enable proguard for cocos2d * examples & test cmake support * add android build type param to gradle.properties file * less warnings * update all android configs to recomended settings * fix network cmake error * fix js-tests cmake error * android build config, add cmake * android build config, add cmake * add lua share lib * android lua cmake build fix * fix * luajit test * run fail, still * fix js-warning * correct lua main include * lua test project cmake support android * try to add lua-template cmake support * lua template fix * js_tests support cmake on android * js-tests improve * cmake support js-template * test to realise prebuild * cmake improve, no feature * improve templates cmake * refactor cmake struct * correct cpp-tests cmake * cpp-templates cmake improve * typo fix * cmake struct refator * change default option * adapt new project struct * uniform cmake test style * add_dependencies to support make -j * little struct improve * little fix * adapt cmake bin dir * little improve about cmake version * change build all tests condition * add source_group for Xcode * add mark source files * add more mark source code * add template project to test * add macos info.plist template * add pak macos for all project * lua test icon fix * not consider lua project for now * modify pak method * add another ios toolchain * add ios system library * update ios toolchain, and reduce ios compile errors * reduce error * make ios engine lib compile pass * cpp-empty-test ios bundle * cpp-tests ios support * js-tests ios support * templates project support ios * fix the way of lua-tests package * try to fix lua-template on macOS * comment lua-template sim file * improve display on xcode * update cmake readme * check android compile again * fix android compile error * fix linux cmake res error * update deps version, for cmake * fix lua_template linux compile error * close android cmake support for now * review template android share library name * change PROP_BUILD_TOOLS_VERSION version to 27.0.1 * change android compile version * make `PROP_APP_PLATFORM` back, add comments for android native build * Revert "make `PROP_APP_PLATFORM` back, add comments for android native build" This reverts commit 272ddc19886891b9502cde070753a870c0fdb588.
2018-02-08 09:24:33 +08:00
# works before build libcocos2d
include(CocosBuildSet)
2014-03-11 17:52:28 +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
# default tests include lua, js test project, so we set those option on to build libs
set(BUILD_LUA_LIBS ON)
set(BUILD_JS_LIBS ON)
2015-04-15 14:02:04 +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
if(NOT USE_COCOS_PREBUILT)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests ${ENGINE_BINARY_PATH}/tests)
2015-04-15 14:02:04 +08:00