support projects outside of Cocos directory (cocos3-alpha)

support projects outside of Cocos directory (cocos3-alpha)
0.0 0



I don’t know if this topic was already discussed if so, accept my apologises.

I’ve updated a little template/multi-platform-cpp/CMakeLists.txt to reuse environment variable COCOS2D_ROOT.

My idea is to easily append a new release of Cocos on jenkins (I’ve already made it with cocos 2.2) with a matrix project, of course it requires to call cmake to refresh Makefile.

Is it ok or may I miss something else .

diff -u template/multi-platform-cpp/CMakeLists.txt /mnt/perso/progs/cocos3/TestV1/CMakeLists.txt 
--- template/multi-platform-cpp/CMakeLists.txt  2013-11-16 20:30:24.000000000 +0100
+++ /mnt/perso/progs/cocos3/TestV1/CMakeLists.txt   2014-01-06 15:33:06.316490912 +0100
@@ -3,7 +3,14 @@
 set(APP_NAME HelloCpp)
 project (${APP_NAME})

+  message("Using external COCOS")
+  set(COCOS2D_ROOT ../..)

 option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
 option(USE_BOX2D "Use box2d for physics library" OFF)
@@ -45,8 +52,6 @@


PS: I think it may also be applied on templates for lua ( no CMakeLists.txt found for js ? )