mirror of https://github.com/axmolengine/axmol.git
Use system env var 'COCOS2DX_ROOT' to avoid copy whole engine sources when create new project with template
This commit is contained in:
parent
7a4a5d0100
commit
d02c9da98b
|
@ -36,7 +36,12 @@ if(XCODE)
|
|||
endif()
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloCpp into root project
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
|
||||
if(NOT ("$ENV{COCOS2DX_ROOT}" STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS2DX_ROOT=$ENV{COCOS2DX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
else
|
||||
message(FATAL_ERROR "Please add system env var 'COCOS2DX_ROOT' to specific the engine root")
|
||||
endif()
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
include(CocosBuildSet)
|
||||
|
|
|
@ -33,8 +33,15 @@ if(XCODE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ("$ENV{COCOS2DX_ROOT}" STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS2DX_ROOT=$ENV{COCOS2DX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
else
|
||||
message(FATAL_ERROR "Please add system env var 'COCOS2DX_ROOT' to specific the engine root")
|
||||
endif()
|
||||
|
||||
set(RUNTIME_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/runtime-src)
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/cocos2d-x)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
include(CocosBuildSet)
|
||||
|
|
|
@ -11,7 +11,13 @@ if(XCODE)
|
|||
endif()
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
if(NOT ("$ENV{COCOS2DX_ROOT}" STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS2DX_ROOT=$ENV{COCOS2DX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
else
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
include(CocosBuildSet)
|
||||
|
|
|
@ -34,7 +34,12 @@ if(XCODE)
|
|||
endif()
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
if(NOT ("$ENV{COCOS2DX_ROOT}" STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS2DX_ROOT=$ENV{COCOS2DX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
else
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
endif()
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
include(CocosBuildSet)
|
||||
|
|
|
@ -11,7 +11,12 @@ if(XCODE)
|
|||
endif()
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
||||
if(NOT ("$ENV{COCOS2DX_ROOT}" STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS2DX_ROOT=$ENV{COCOS2DX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
else
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
||||
endif()
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
include(CocosBuildSet)
|
||||
|
|
Loading…
Reference in New Issue