package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.7 KiB
37 lines
1.7 KiB
package("discord") |
|
|
|
set_homepage("https://discord.com/developers/docs/game-sdk/") |
|
set_description("Whether you’re part of a school club, gaming group, worldwide art community, or just a handful of friends that want to spend time together, Discord makes it easy to talk every day and hang out more often.") |
|
|
|
add_versions("2.5.6", "426eb5fa70647d884f461c63825b63668349efb4bc68a16e70bc4a24e119b92e") |
|
|
|
set_urls("https://dl-game-sdk.discordapp.net/$(version)/discord_game_sdk.zip") |
|
|
|
on_install("windows", function (package) |
|
os.cp("cpp/*.h", package:installdir("include")) |
|
os.cp("c/*.h", package:installdir("include")) |
|
os.cp("Release/*.lib", package:installdir("lib")) |
|
if package:is_arch("x64") then |
|
os.cp("lib/x86_64/discord_game_sdk.dll", package:installdir("bin")) |
|
os.cp("lib/x86_64/discord_game_sdk.dll.lib", package:installdir("lib")) |
|
else |
|
os.cp("lib/x86/discord_game_sdk.dll", package:installdir("bin")) |
|
os.cp("lib/x86/discord_game_sdk.dll.lib", package:installdir("lib")) |
|
end |
|
|
|
local configs = {} |
|
if package:config("shared") then |
|
configs.kind = "shared" |
|
end |
|
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
|
import("package.tools.xmake").install(package, configs) |
|
end) |
|
|
|
on_test(function (package) |
|
assert(package:check_cxxsnippets({test = [[ |
|
void test() { |
|
discord::Core* core{}; |
|
auto result = discord::Core::Create(310270644849737729, DiscordCreateFlags_Default, &core); |
|
} |
|
]]}, {configs = {languages = "c++14"}, includes = "discord.h"})) |
|
end)
|
|
|