update poco, add mysql support (#1995)

* update poco, add mysql support

* Update xmake.lua

* update mysql 

to satisfy "mysql/mysql.h"

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/1997/head
xpxz 2 years ago committed by GitHub
parent 141dd76df5
commit 08a1fe7fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/m/mysql/xmake.lua
  2. 8
      packages/p/poco/xmake.lua

@ -11,21 +11,21 @@ package("mysql")
set_urls("https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-$(version)-winx64.zip")
add_versions("6.1.11", "3555641cea2da60435ab7f1681a94d1aa97341f1a0f52193adc82a83734818ca")
end
else
else
set_urls("https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-$(version).tar.gz",
"https://github.com/xmake-mirror/mysql-boost/releases/download/$(version)/mysql-boost-$(version).tar.gz")
add_versions("5.7.29", "00f514124de2bad1ba7b380cbbd46e316cae7fc7bc3a5621456cabf352f27978")
end
if is_plat("macosx", "linux") then
add_includedirs("include/mysql")
add_deps("cmake", "openssl")
if is_plat("linux") then
add_deps("ncurses")
end
end
add_includedirs("include", "include/mysql")
on_install("macosx", "linux", function (package)
-- https://bugs.mysql.com/bug.php?id=87348
-- Fixes: "ADD_SUBDIRECTORY given source
@ -57,7 +57,7 @@ package("mysql")
end)
on_install("windows", function (package)
os.cp("include", package:installdir())
os.cp("include/*", package:installdir("include/mysql"))
if package:config("shared") then
os.cp("lib/libmysql.lib", package:installdir("lib"))
os.cp("lib/libmysql.dll", package:installdir("bin"))

@ -69,6 +69,14 @@ package("poco")
for _, lib in ipairs({"mysql", "postgresql", "odbc"}) do
table.insert(configs, "-DENABLE_DATA_" .. lib:upper() .. "=" .. (package:config(lib) and "ON" or "OFF"))
end
if package:config("mysql") then
local libmysql = package:dep("mysql"):fetch()
if libmysql then
table.insert(configs, "-DMYSQL_INCLUDE_DIR=" .. table.concat(libmysql.includedirs or libmysql.sysincludedirs, ";"))
table.insert(configs, "-DMYSQL_LIBRARY=" .. table.concat(libmysql.libfiles or {}, ";"))
end
end
-- warning: only works on windows sdk 10.0.18362.0 and later
import("package.tools.cmake").install(package, configs)

Loading…
Cancel
Save