add glad and yaml-cpp as well as update some packages (#182)
* update fmt and glfw * add yaml-cpp * add gladpull/183/head
parent
4095212d76
commit
f2fbb7d49e
5 changed files with 53 additions and 8 deletions
@ -0,0 +1,25 @@ |
||||
package("glad") |
||||
|
||||
set_homepage("https://glad.dav1d.de/") |
||||
set_description("Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/Dav1dde/glad/archive/$(version).tar.gz", |
||||
"https://github.com/Dav1dde/glad.git") |
||||
add_versions("v0.1.34", "4be2900ff76ac71a2aab7a8be301eb4c0338491c7e205693435b09aad4969ecd") |
||||
|
||||
add_deps("cmake", "python 3.x", {kind = "binary"}) |
||||
if is_plat("linux") then |
||||
add_syslinks("dl") |
||||
end |
||||
on_install("windows", "linux", "macosx", function (package) |
||||
local configs = {"-DGLAD_INSTALL=ON", "-DGLAD_REPRODUCIBLE=ON"} |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DUSE_MSVC_RUNTIME_LIBRARY_DLL=" .. (package:config("vs_runtime"):startswith("MT") and "OFF" or "ON")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("gladLoadGL", {includes = "glad/glad.h"})) |
||||
end) |
@ -0,0 +1,23 @@ |
||||
package("yaml-cpp") |
||||
|
||||
set_homepage("https://github.com/jbeder/yaml-cpp/") |
||||
set_description("A YAML parser and emitter in C++") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-$(version).tar.gz") |
||||
add_versions("0.6.3", "77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed") |
||||
|
||||
add_deps("cmake") |
||||
on_install("windows", "linux", "macosx", function (package) |
||||
local configs = {"-DYAML_CPP_BUILD_TESTS=OFF"} |
||||
table.insert(configs, "-DYAML_BUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DYAML_MSVC_SHARED_RT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs, {buildir = os.tmpfile() .. ".dir"}) |
||||
package:addenv("PATH", "bin") |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxtypes("YAML::Parser", {configs = {languages = "c++11"}, includes = "yaml-cpp/yaml.h"})) |
||||
end) |
Loading…
Reference in new issue