Skip to content

Commit

Permalink
cgraph: fix xmake.lua (#6444)
Browse files Browse the repository at this point in the history
* cgraph: fix xmake.lua

* update xmake.lua

* update xmake.lua

* update xmake.lua

* Update xmake.lua

---------

Co-authored-by: star9029 <[email protected]>
  • Loading branch information
KkemChen and star-hengxing authored Feb 25, 2025
1 parent a9731a0 commit 280fa83
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions packages/c/cgraph/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package("cgraph")
set_kind("library", {headeronly = true})
set_homepage("http://www.chunel.cn")
set_description("A common used C++ DAG framework")
set_license("MIT")
Expand All @@ -12,12 +11,34 @@ package("cgraph")
add_versions("v2.6.0", "1b055ee86f0340f2c35b4ed40c4a3b4cc05081b115b0fb634d778671018648f2")
add_versions("v2.5.4", "fd5a53dc0d7e3fc11050ccc13fac987196ad42184a4e244b9d5e5d698b1cb101")

if is_plat("windows") then
add_cxxflags("/source-charset:utf-8")
if is_plat("linux", "bsd") then
add_syslinks("pthread")
end

on_install(function (package)
os.vcp("src/*", package:installdir("include"))
if package:has_tool("cxx", "cl") then
package:add("cxxflags", "/utf-8")
end

io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
set_languages("c++11")
set_encodings("utf-8")
target("cgraph")
set_kind("$(kind)")
add_files("src/**.cpp")
add_headerfiles("src/(**.h)", "src/(**.inl)")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end
if is_plat("linux", "macosx") then
add_defines("_ENABLE_LIKELY_")
end
if is_plat("linux", "bsd") then
add_syslinks("pthread")
end
]])
import("package.tools.xmake").install(package)
end)

on_test(function (package)
Expand Down

0 comments on commit 280fa83

Please sign in to comment.