From 08e4233eafcdd3b95d4ef2a2075e8a5986d6a54f Mon Sep 17 00:00:00 2001 From: lveyou <1339484752@qq.com> Date: Fri, 6 Sep 2024 19:00:30 +0800 Subject: [PATCH] =?UTF-8?q?*=20angelscript=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 + dl/CMakeLists.txt | 4 + dl/dl.h | 1 + dl/io/dl_log.cpp | 5 +- dl/script/dl_as.cpp | 105 ++++++++++++++++++ dl/script/dl_as.h | 33 ++++++ dltest/CMakeLists.txt | 2 + dltest/main.cpp | 5 + res/as/初始.txt | 9 ++ .../add_on/scriptbuilder/scriptbuilder.cpp | 6 +- .../scriptstdstring/scriptstdstring.cpp | 12 +- 11 files changed, 179 insertions(+), 5 deletions(-) create mode 100644 dl/script/dl_as.cpp create mode 100644 dl/script/dl_as.h create mode 100644 res/as/初始.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 35fce63b..2be2dafe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,8 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") message("------------------iconv 文本编码转换库-----------") #add_subdirectory ("third/libiconv") endif() +message("------------------angelscript 脚本语言库-----------") +add_subdirectory ("third/angelscript/angelscript/projects/cmake") message("------------------其余库以其他形式链接----------") message("------------------nlohmann-json json库---------") diff --git a/dl/CMakeLists.txt b/dl/CMakeLists.txt index 0c3e1989..daf41b2a 100644 --- a/dl/CMakeLists.txt +++ b/dl/CMakeLists.txt @@ -150,6 +150,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows") target_link_libraries(${PROJECT_NAME} PRIVATE ODE) endif() +#angelscript +include_directories(${CMAKE_SOURCE_DIR}/third/angelscript/add_on) +target_link_libraries(${PROJECT_NAME} PRIVATE angelscript) + # curl if (NOT DL_DISABLE_CURL) if (CMAKE_SYSTEM_NAME MATCHES "Windows") diff --git a/dl/dl.h b/dl/dl.h index 6a196cab..790e4398 100644 --- a/dl/dl.h +++ b/dl/dl.h @@ -34,6 +34,7 @@ #include