fix some code style

pull/361/head
ruki 4 years ago
parent a62c6cf507
commit 39003b40b8
No known key found for this signature in database
GPG Key ID: 809EF06AD42725BD
  1. 8
      packages/p/postgresql/xmake.lua

@ -27,19 +27,17 @@ package("postgresql")
end
-- find programs
local binfile = find_program("postgres", {pathes = {"$(env PATH)"}})
local binfile = find_program("postgres", {paths = os.getenv("PATH")})
if binfile then
local packagedir = path.directory(path.directory(binfile))
table.insert(paths, packagedir)
package:addenv("PATH", path.join(packagedir, "bin"))
end
local result = {links = {}, linkdirs = {}, includedirs = {}, libfiles = {}}
-- find library
local result = {links = {}, linkdirs = {}, includedirs = {}, libfiles = {}}
local libname = (package:is_plat("windows") and "libpq" or "pq")
local linkinfo = find_library(libname, paths, {suffixes = "lib"})
print(linkinfo)
if linkinfo then
table.insert(result.linkdirs, linkinfo.linkdir)
table.insert(result.links, libname)
@ -58,8 +56,6 @@ package("postgresql")
if path then
table.insert(result.includedirs, path)
end
-- ok?
if #result.includedirs > 0 and #result.linkdirs > 0 then
return result
end

Loading…
Cancel
Save