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

pull/427/head
Ashley 4 years ago committed by GitHub
parent 92c4d491fa
commit 0c24568a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/d/drogon/xmake.lua

@ -16,7 +16,7 @@ package("drogon")
add_deps("cmake")
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})
if is_plat("windows") then
add_syslinks("ws2_32", "rpcrt4", "crypt32", "advapi32")
@ -42,6 +42,9 @@ package("drogon")
if not package:dep("sqlite3"):fetch() then
table.insert(configs, "-DBUILD_SQLITE=OFF")
end
if not package:dep("mysql"):fetch() then
table.insert(configs, "-DBUILD_MYSQL=OFF")
end
if package:config("pic") ~= false then
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
end

Loading…
Cancel
Save