-
我自己写了一份 package("vk-bootstrap")
set_homepage("https://github.com/charles-lunarg/vk-bootstrap")
set_description("Vulkan Bootstrapping Iibrary.")
set_license("MIT")
add_urls("https://github.com/charles-lunarg/vk-bootstrap.git")
add_deps("vulkan-headers")
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
if is_plat("linux") then
add_syslinks("dl")
end
on_install("windows", "linux", "macosx", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_requires("vulkan-headers")
target("vk-bootstrap")
set_kind("static")
set_languages("cxx14")
add_files("src/VkBootstrap.cpp")
add_headerfiles("src/VkBootstrap.h")
add_headerfiles("src/VkBootstrapDispatch.h")
add_packages("vulkan-headers")
if is_plat("linux") then
add_syslinks("dl")
end
]])
import("package.tools.xmake").install(package, {"-m release"})
end)
on_test(function (package)
assert(package:has_cfuncs("destroy_instance", {includes = "VkBootstrap.h"}))
end) 会报错: => install vk-bootstrap master .. failed
include/VkBootstrap.h:19:10: fatal error: 'cassert' file not found 若把其中的 target 描述域部分拿出来先 build 为 static 再 add_deps() 到应用上是可行的。 请问有什么思路吗? |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Apr 21, 2022
Replies: 1 comment 1 reply
-
提示很明显了,languages 不对,找不到,on_test 里面加上对应 languages,参考下其他 xmake-repo 包
另外,c++ 是 has_cxxfuncs 不是 has_cfuncs |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zheng95z
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提示很明显了,languages 不对,找不到,on_test 里面加上对应 languages,参考下其他 xmake-repo 包
另外,c++ 是 has_cxxfuncs 不是 has_cfuncs