File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ AssureOutOfSourceBuilds()
4141# works before build libcocos2d
4242include (CocosBuildSet)
4343
44+ # build options
45+ option (BUILD_TESTS "Build tests" ON )
46+
4447# default tests include lua, js test project, so we set those option on to build libs
4548set (BUILD_LUA_LIBS ON )
4649set (BUILD_JS_LIBS ON )
@@ -50,8 +53,10 @@ add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
5053# prevent tests project to build "cocos2d-x/cocos" again
5154set (BUILD_ENGINE_DONE ON )
5255# 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