mirror of https://github.com/axmolengine/axmol.git
[cmake] Rename BUILD_LUA_LIBS to AX_ENABLE_EXT_LUA
This commit is contained in:
parent
67fad92cbf
commit
67c6bcec4f
|
@ -45,16 +45,16 @@ include(PreventInSourceBuilds)
|
||||||
# works before build libcocos2d
|
# works before build libcocos2d
|
||||||
include(CocosBuildSet)
|
include(CocosBuildSet)
|
||||||
|
|
||||||
option(BUILD_TESTS "Build cpp & lua tests" ON)
|
option(AX_BUILD_TESTS "Build cpp & lua tests" ON)
|
||||||
|
|
||||||
set(BUILD_LUA_LIBS ON)
|
set(AX_ENABLE_EXT_LUA ON)
|
||||||
|
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
||||||
|
|
||||||
# prevent tests project to build "adxe/core" again
|
# prevent tests project to build "adxe/core" again
|
||||||
set(BUILD_ENGINE_DONE ON)
|
set(BUILD_ENGINE_DONE ON)
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
if(AX_BUILD_TESTS)
|
||||||
# add cpp-template-default into project(adxe) for tmp test
|
# add cpp-template-default into project(adxe) for tmp test
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/tests/HelloCpp)
|
add_subdirectory(${ADXE_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/tests/HelloCpp)
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ if(BUILD_TESTS)
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/tests/fairygui-tests ${ENGINE_BINARY_PATH}/tests/fairygui-tests)
|
add_subdirectory(${ADXE_ROOT_PATH}/tests/fairygui-tests ${ENGINE_BINARY_PATH}/tests/fairygui-tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_LUA_LIBS)
|
if(AX_ENABLE_EXT_LUA)
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/templates/lua-template-default ${ENGINE_BINARY_PATH}/tests/HelloLua)
|
add_subdirectory(${ADXE_ROOT_PATH}/templates/lua-template-default ${ENGINE_BINARY_PATH}/tests/HelloLua)
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test)
|
add_subdirectory(${ADXE_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test)
|
||||||
endif(BUILD_LUA_LIBS)
|
endif(AX_ENABLE_EXT_LUA)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -162,7 +162,7 @@ function(copy_thirdparty_dlls cocos_target destDir)
|
||||||
# list(APPEND DEPENDENCIES ${INTERFACE_LINK_LIBRARIES})
|
# list(APPEND DEPENDENCIES ${INTERFACE_LINK_LIBRARIES})
|
||||||
# endif()
|
# endif()
|
||||||
|
|
||||||
if(BUILD_LUA_LIBS) # TODO: rename to AX_ENABLE_EXT_LUA
|
if(AX_ENABLE_EXT_LUA)
|
||||||
list(APPEND DEPENDENCIES ${LUA_ENGINE})
|
list(APPEND DEPENDENCIES ${LUA_ENGINE})
|
||||||
list(APPEND DEPENDENCIES tolua)
|
list(APPEND DEPENDENCIES tolua)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -29,7 +29,7 @@ message(STATUS "PYTHON_PATH:" ${PYTHON_COMMAND})
|
||||||
message(STATUS "COCOS_COMMAND_PATH:" ${COCOS_COMMAND})
|
message(STATUS "COCOS_COMMAND_PATH:" ${COCOS_COMMAND})
|
||||||
message(STATUS "HOST_SYSTEM:" ${CMAKE_HOST_SYSTEM_NAME})
|
message(STATUS "HOST_SYSTEM:" ${CMAKE_HOST_SYSTEM_NAME})
|
||||||
# the default behavior of build module
|
# the default behavior of build module
|
||||||
option(BUILD_LUA_LIBS "Build lua libraries" OFF)
|
option(AX_ENABLE_EXT_LUA "Build lua libraries" OFF)
|
||||||
|
|
||||||
# hold the extensions list to auto link to app
|
# hold the extensions list to auto link to app
|
||||||
set(CC_EXTENSION_LIBS "" CACHE INTERNAL "extensions for auto link to target application")
|
set(CC_EXTENSION_LIBS "" CACHE INTERNAL "extensions for auto link to target application")
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
# this CMakeLists is to generate Cocos2d-x Engine Library
|
# this CMakeLists is to generate Cocos2d-x Engine Library
|
||||||
# build adxe
|
# build adxe
|
||||||
# build adxelua if BUILD_LUA_LIBS=ON
|
# build adxelua if AX_ENABLE_EXT_LUA=ON
|
||||||
|
|
||||||
# The version number
|
# The version number
|
||||||
set(ADXE_VERSION 1.0)
|
set(ADXE_VERSION 1.0)
|
||||||
|
@ -149,7 +149,7 @@ set_target_properties(${ADXE_CORE_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Lua bindings lib
|
## Lua bindings lib
|
||||||
# if(BUILD_LUA_LIBS)
|
# if(AX_ENABLE_EXT_LUA)
|
||||||
# add_subdirectory(${ADXE_ROOT_PATH}/extensions/scripting/lua-bindings ${ENGINE_BINARY_PATH}/core/lua-bindings)
|
# add_subdirectory(${ADXE_ROOT_PATH}/extensions/scripting/lua-bindings ${ENGINE_BINARY_PATH}/core/lua-bindings)
|
||||||
# endif()
|
# endif()
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ if(AX_ENABLE_EXT_COCOSTUDIO)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_LUA_LIBS) # TODO: rename to AX_ENABLE_EXT_LUA
|
if(AX_ENABLE_EXT_LUA)
|
||||||
add_subdirectory(scripting/lua-bindings)
|
add_subdirectory(scripting/lua-bindings)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ set(SOURCE
|
||||||
#~ implot/implot_demo.cpp
|
#~ implot/implot_demo.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
#~ if(BUILD_LUA_LIBS)
|
#~ if(AX_ENABLE_EXT_LUA)
|
||||||
#~ include_directories(
|
#~ include_directories(
|
||||||
#~ lua-bindings
|
#~ lua-bindings
|
||||||
#~ ${ADXE_ROOT_PATH}/thirdparty/lua/luajit/include
|
#~ ${ADXE_ROOT_PATH}/thirdparty/lua/luajit/include
|
||||||
|
|
|
@ -52,7 +52,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloLua into root project
|
||||||
set(CMAKE_MODULE_PATH ${ADXE_ROOT_PATH}/cmake/Modules/)
|
set(CMAKE_MODULE_PATH ${ADXE_ROOT_PATH}/cmake/Modules/)
|
||||||
|
|
||||||
include(CocosBuildSet)
|
include(CocosBuildSet)
|
||||||
set(BUILD_LUA_LIBS ON)
|
set(AX_ENABLE_EXT_LUA ON)
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||||
set(CMAKE_MODULE_PATH ${ADXE_ROOT_PATH}/cmake/Modules/)
|
set(CMAKE_MODULE_PATH ${ADXE_ROOT_PATH}/cmake/Modules/)
|
||||||
|
|
||||||
include(CocosBuildSet)
|
include(CocosBuildSet)
|
||||||
set(BUILD_LUA_LIBS ON)
|
set(AX_ENABLE_EXT_LUA ON)
|
||||||
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
add_subdirectory(${ADXE_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/adxe/core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ add_library(thirdparty STATIC empty.cpp)
|
||||||
|
|
||||||
# header only libs
|
# header only libs
|
||||||
target_include_directories(thirdparty
|
target_include_directories(thirdparty
|
||||||
|
INTERFACE "fmt/include"
|
||||||
INTERFACE "robin-map/include"
|
INTERFACE "robin-map/include"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -207,7 +208,7 @@ if(AX_WITH_ASTC)
|
||||||
endif(AX_WITH_ASTC)
|
endif(AX_WITH_ASTC)
|
||||||
|
|
||||||
# use lua/js specific libs by property to prevent conflict
|
# use lua/js specific libs by property to prevent conflict
|
||||||
if(BUILD_LUA_LIBS)
|
if(AX_ENABLE_EXT_LUA)
|
||||||
add_subdirectory(lua/${AX_LUA_ENGINE})
|
add_subdirectory(lua/${AX_LUA_ENGINE})
|
||||||
add_subdirectory(lua/tolua)
|
add_subdirectory(lua/tolua)
|
||||||
add_subdirectory(lua/lua-cjson)
|
add_subdirectory(lua/lua-cjson)
|
||||||
|
@ -335,11 +336,6 @@ if(AX_WITH_KCP)
|
||||||
target_compile_definitions(thirdparty PUBLIC YASIO_HAVE_KCP=1)
|
target_compile_definitions(thirdparty PUBLIC YASIO_HAVE_KCP=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# fmt-lib
|
|
||||||
add_subdirectory(fmt)
|
|
||||||
target_link_libraries(thirdparty fmt-header-only)
|
|
||||||
configure_target_outdir(fmt)
|
|
||||||
|
|
||||||
# put "thirdparty" into thirdparty folder, too
|
# put "thirdparty" into thirdparty folder, too
|
||||||
configure_target_outdir(thirdparty)
|
configure_target_outdir(thirdparty)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue