ソースを参照

Auto-update tgbot-cpp to v1.7.3 (#3451)

* Update tgbot-cpp to v1.7.3

* use c++17

* fix boost exception

* fix c++ exception

---------

Co-authored-by: star-hengxing <[email protected]>
ruki 1 年間 前
コミット
c342a3c4c8
1 ファイル変更5 行追加7 行削除
  1. 5 7
      packages/t/tgbot-cpp/xmake.lua

+ 5 - 7
packages/t/tgbot-cpp/xmake.lua

@@ -6,6 +6,7 @@ package("tgbot-cpp")
     set_urls("https://github.com/reo7sp/tgbot-cpp/archive/refs/tags/$(version).tar.gz",
              "https://github.com/reo7sp/tgbot-cpp.git")
 
+    add_versions("v1.7.3", "f1d2863a7ac77f2a58b3c6f8a163b4d6e9d191ab5bff0dcf6e271adabf9111a9")
     add_versions("v1.7.2", "3a41c25c5e4b60bda3f278550a380f1c7c382fd50ea1ab1801edc837d1535462")
 
     add_configs("curl", {description = "Use curl-based http client CurlHttpClient", default = false, type = "boolean"})
@@ -20,7 +21,6 @@ package("tgbot-cpp")
     end)
 
     on_install("windows", "linux", "macosx", "mingw", "cross", function (package)
-        local configs = {}
         io.writefile("xmake.lua", [[
             add_requires("openssl", "zlib")
             add_requires("boost", {configs = {system = true}})
@@ -33,7 +33,8 @@ package("tgbot-cpp")
                 add_files("src/**.cpp")
                 add_includedirs("include")
                 add_headerfiles("include/(tgbot/**.h)")
-                set_languages("c++14")
+                set_languages("c++17")
+                set_exceptions("cxx")
                 if is_plat("windows") then
                     add_defines("_WIN32_WINNT=0x0601", "WIN32_LEAN_AND_MEAN", "NOMINMAX")
                 end
@@ -49,10 +50,7 @@ package("tgbot-cpp")
                     add_defines("HAVE_CURL")
                 end
         ]])
-        if package:config("shared") then
-            configs.kind = "shared"
-        end
-        import("package.tools.xmake").install(package, configs)
+        import("package.tools.xmake").install(package)
     end)
 
     on_test(function (package)
@@ -61,5 +59,5 @@ package("tgbot-cpp")
             void test() {
                 TgBot::Bot bot("PLACE YOUR TOKEN HERE");
             }
-        ]]}, {configs = {languages = "c++14"}}))
+        ]]}, {configs = {languages = "c++17"}}))
     end)