Browse Source

add mysql as an optional dep, disable it if not used (#425)

Ashley 4 years ago
parent
commit
0c24568a8c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/d/drogon/xmake.lua

+ 4 - 1
packages/d/drogon/xmake.lua

@@ -16,7 +16,7 @@ package("drogon")
 
 
     add_deps("cmake")
     add_deps("cmake")
     add_deps("trantor", "jsoncpp", "brotli", "zlib")
     add_deps("trantor", "jsoncpp", "brotli", "zlib")
-    add_deps("c-ares", "sqlite3", "openssl", {optional = true})
+    add_deps("c-ares", "sqlite3", "openssl", "mysql", {optional = true})
     add_deps("postgresql", {optional = true, system = true})
     add_deps("postgresql", {optional = true, system = true})
     if is_plat("windows") then
     if is_plat("windows") then
         add_syslinks("ws2_32", "rpcrt4", "crypt32", "advapi32")
         add_syslinks("ws2_32", "rpcrt4", "crypt32", "advapi32")
@@ -42,6 +42,9 @@ package("drogon")
         if not package:dep("sqlite3"):fetch() then
         if not package:dep("sqlite3"):fetch() then
             table.insert(configs, "-DBUILD_SQLITE=OFF")
             table.insert(configs, "-DBUILD_SQLITE=OFF")
         end
         end
+        if not package:dep("mysql"):fetch() then
+            table.insert(configs, "-DBUILD_MYSQL=OFF")
+        end
         if package:config("pic") ~= false then
         if package:config("pic") ~= false then
             table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
             table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
         end
         end