note/专业积累/工具/xmake/xmake 库.md
2023-07-05 09:34:06 +08:00

1.1 KiB

LUA

luasocket

local luasocket_xmake = [[
local kind = "%s"
add_requires("lua")
target("luasocket")
    set_basename("core")
    set_kind(kind)
    add_packages("lua")
    add_syslinks("ws2_32")
    add_files("src/auxiliar.c","src/buffer.c","src/compat.c" ,"src/except.c" ,"src/inet.c")
    add_files("src/io.c","src/luasocket.c","src/options.c" ,"src/select.c" ,"src/tcp.c")
    add_files("src/timeout.c","src/udp.c","src/wsocket.c")
    add_headerfiles("src/*.h")
]]
package("luasocket")
	--这里的kind决定的是库如何被链接到程序中
	--nil or library 会加入目录
	-- share 会加入运行环境
    --set_kind("share")
    set_urls("https://github.com/lunarmodules/luasocket.git")
    --on_load(function (package)
        --package:addenv("PATH", "bin")
    --end)
    on_install("macosx", "linux", "windows", function (package)
        package:config("shared")
        io.writefile("xmake.lua", format(luasocket_xmake,"shared"))
        local configs = {kind = "shared"}
        import("package.tools.xmake").install(package, configs)
    end)

lua-protobuf

C++

protobuf

glm

SDK

vulkan

Opengl