From 95e8b68051e14671bef4bf3026c301f6f740299c Mon Sep 17 00:00:00 2001 From: halx99 Date: Fri, 24 Jun 2022 03:09:20 +0800 Subject: [PATCH] Improve project template [skip ci] --- templates/cpp-template-default/CMakeLists.txt | 3 +++ templates/lua-template-default/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index d9e5960851..22681fc5d7 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -198,6 +198,9 @@ if (AX_WITH_YAML_CPP) endif() if (_AX_USE_PREBUILT) # support windows only + include(${ADXE_ROOT_PATH}/cmake/Modules/CocosConfigDefine.cmake) + use_cocos2dx_compile_define(${APP_NAME}) + include(${ADXE_ROOT_PATH}/cmake/Modules/AdxeLinkHelpers.cmake) adxe_link_cxx_prebuilt(${APP_NAME} ${ADXE_ROOT_PATH} ${AX_PREBUILT_DIR}) endif() \ No newline at end of file diff --git a/templates/lua-template-default/CMakeLists.txt b/templates/lua-template-default/CMakeLists.txt index ac6d15bf68..7a04a24e06 100644 --- a/templates/lua-template-default/CMakeLists.txt +++ b/templates/lua-template-default/CMakeLists.txt @@ -212,6 +212,9 @@ if (AX_WITH_YAML_CPP) endif() if (_AX_USE_PREBUILT) # support windows only + include(${ADXE_ROOT_PATH}/cmake/Modules/CocosConfigDefine.cmake) + use_cocos2dx_compile_define(${APP_NAME}) + include(${ADXE_ROOT_PATH}/cmake/Modules/AdxeLinkHelpers.cmake) adxe_link_lua_prebuilt(${APP_NAME} ${ADXE_ROOT_PATH} ${AX_PREBUILT_DIR}) endif()