enkits: support some platform (#4754)

pull/4757/head
star9029 4 months ago committed by GitHub
parent 81507f3e79
commit fbbce85d26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/e/enkits/xmake.lua

@ -12,7 +12,7 @@ package("enkits")
add_deps("cmake")
add_linkdirs("lib/enkiTS")
add_links("enkiTS")
if is_plat("linux") then
if is_plat("linux", "bsd") then
add_syslinks("pthread", "rt")
end
@ -22,13 +22,13 @@ package("enkits")
end
end)
on_install("windows", "macosx", "linux", function (package)
on_install(function (package)
if package:is_plat("linux") then
io.replace("src/TaskScheduler.h", "#include <functional>", "#include <functional>\n#include <initializer_list>\n", {plain = true})
end
local configs = {"-DENKITS_BUILD_EXAMPLES=OFF", "-DENKITS_INSTALL=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DENKITS_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

Loading…
Cancel
Save