代码拉取完成,页面将自动刷新
-- add_syslinks("glfw", "glm")
target("vulkan_test")
set_strip("all")
set_targetdir("./bin")
-- I Use clang on macos, You define your tools
add_cxxflags("clang::-Wc++11-long-long","clang::-Wc++11-extensions","clang::-fno-autolink")
set_languages(cxx17)
set_kind("binary")
add_files("*.cpp")
-- Define your path to `include dir` and `lib dir`
add_includedirs("/Volumes/MacOsData/usr/Cellar/glfw/3.4/include")
add_includedirs("/Volumes/MacOsData/usr/Cellar/glm/1.0.1/include")
add_includedirs("/Volumes/MacOsData/tmp/vulkan-sdk/macOS/include")
add_linkdirs("/Volumes/MacOsData/tmp/vulkan-sdk/macOS/lib")
add_linkdirs("/Volumes/MacOsData/usr/Cellar/glfw/3.4/lib")
-- check `lib dir` and see if there has like `libvulkan.dylib`, and then put `vulkan` to add_links(<here>)
add_links("glfw", "vulkan")
-- on_build(function (target)
-- print("[BUILDING target]: [vulkan_test]")
-- end)
-- after_build(function (target)
-- -- I do not know ldid doing what
-- -- os.run("ldid -S %s", target:targetfile())
-- end)
-- Define yourself
on_clean(function (target)
-- Delete only target files
os.rm(target:targetfile())
os.run("rm -rf bin build")
end)
-- Set up a custom installation script to automatically install apk files
on_install(function (target)
-- Use adb to install packaged apk files
os.run("install -m 755 bin/vulkan_test /Users/mutou/SubOs/usr/bin/vulkan_test")
end)
-- Define your command
on_uninstall(function (target)
os.run("rm -rf /Users/mutou/SubOs/usr/bin/vulkan_test")
end)
target_end()
-- WHEN I CONFIG SOME FUNCS LIKE `on_build, ...`, it may cause typing `xmake` to build but nothing happend, YET I do not know why
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。