File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ AssureOutOfSourceBuilds()
41
41
# works before build libcocos2d
42
42
include (CocosBuildSet)
43
43
44
+ # build options
45
+ option (BUILD_TESTS "Build tests" ON )
46
+
44
47
# default tests include lua, js test project, so we set those option on to build libs
45
48
set (BUILD_LUA_LIBS ON )
46
49
set (BUILD_JS_LIBS ON )
@@ -50,8 +53,10 @@ add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
50
53
# prevent tests project to build "cocos2d-x/cocos" again
51
54
set (BUILD_ENGINE_DONE ON )
52
55
# add engine all tests project
53
- add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/cpp-empty-test ${ENGINE_BINARY_PATH} /tests/cpp-empty-test )
54
- add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/cpp-tests ${ENGINE_BINARY_PATH} /tests/cpp-tests)
55
- add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/js-tests/project ${ENGINE_BINARY_PATH} /tests/js-tests)
56
- add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/lua-empty-test /project ${ENGINE_BINARY_PATH} /tests/lua-empty-test )
57
- add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/lua-tests/project ${ENGINE_BINARY_PATH} /tests/lua-test )
56
+ if (BUILD_TESTS)
57
+ add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/cpp-empty-test ${ENGINE_BINARY_PATH} /tests/cpp-empty-test )
58
+ add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/cpp-tests ${ENGINE_BINARY_PATH} /tests/cpp-tests)
59
+ add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/js-tests/project ${ENGINE_BINARY_PATH} /tests/js-tests)
60
+ add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/lua-empty-test /project ${ENGINE_BINARY_PATH} /tests/lua-empty-test )
61
+ add_subdirectory (${COCOS2DX_ROOT_PATH} /tests/lua-tests/project ${ENGINE_BINARY_PATH} /tests/lua-test )
62
+ endif ()
You can’t perform that action at this time.
0 commit comments