From a19bb681666bb640942f4184f1aca56225a3c110 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 04:27:15 +0200 Subject: [PATCH 1/7] RenderGraph: add package. --- packages/r/rendergraph/xmake.lua | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/r/rendergraph/xmake.lua diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua new file mode 100644 index 000000000..0020ceb34 --- /dev/null +++ b/packages/r/rendergraph/xmake.lua @@ -0,0 +1,42 @@ +package("rendergraph") + + set_homepage("https://github.com/DragonJoker/RenderGraph/") + set_description("Vulkan render graph management library. .") + + set_urls("https://github.com/DragonJoker/RenderGraph.git") + add_versions("1.0", "61e814bb0298983eae853d9ba5386a272ebc1eb9") + + add_deps("vulkan-headers") + + add_links("RenderGraph") + + on_install("windows", "macosx", "linux", function (package) + io.writefile("xmake.lua", [[ + add_rules("mode.debug", "mode.release") + add_requires("vulkan-headers") + target("RenderGraph") + set_kind("shared") + add_includedirs("include") + add_files("source/RenderGraph/RunnablePasses/*.cpp") + add_files("source/RenderGraph/*.cpp") + set_languages("c++20") + add_defines("RenderGraph_EXPORTS") + add_headerfiles("include/RenderGraph/RunnablePasses/*.hpp", {prefixdir="RenderGraph/RunnablePasses"}) + add_headerfiles("include/RenderGraph/*.hpp", {prefixdir="RenderGraph"}) + add_packages("vulkan-headers") + ]]) + import("package.tools.xmake").install(package) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + static void test() + { + crg::ResourceHandler handler; + crg::FrameGraph graph{ handler, "test" }; + } + ]]}, {configs = {languages = "cxx20"}, + includes = { + "RenderGraph/FrameGraph.hpp", + "RenderGraph/ResourceHandler.hpp"}})) + end) From 4b5994d9b11f81d9a70e7c868925dbc63674f084 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 04:35:30 +0200 Subject: [PATCH 2/7] RenderGraph: Restrict to x64. --- packages/r/rendergraph/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index 0020ceb34..52fe3efd7 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -10,7 +10,7 @@ package("rendergraph") add_links("RenderGraph") - on_install("windows", "macosx", "linux", function (package) + on_install("windows|x64", "macosx", "linux", function (package) io.writefile("xmake.lua", [[ add_rules("mode.debug", "mode.release") add_requires("vulkan-headers") From 8508aefe4f45b99266aaa6dc847918a1a309dd23 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 04:46:45 +0200 Subject: [PATCH 3/7] RenderGraph: Added spaces for `prefixdir` --- packages/r/rendergraph/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index 52fe3efd7..affc32b71 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -21,8 +21,8 @@ package("rendergraph") add_files("source/RenderGraph/*.cpp") set_languages("c++20") add_defines("RenderGraph_EXPORTS") - add_headerfiles("include/RenderGraph/RunnablePasses/*.hpp", {prefixdir="RenderGraph/RunnablePasses"}) - add_headerfiles("include/RenderGraph/*.hpp", {prefixdir="RenderGraph"}) + add_headerfiles("include/RenderGraph/RunnablePasses/*.hpp", {prefixdir = "RenderGraph/RunnablePasses"}) + add_headerfiles("include/RenderGraph/*.hpp", {prefixdir = "RenderGraph"}) add_packages("vulkan-headers") ]]) import("package.tools.xmake").install(package) From 7566931520b9a612f416270d862b15321c930cbd Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 04:59:37 +0200 Subject: [PATCH 4/7] RenderGraph: Fixed kind handling --- packages/r/rendergraph/xmake.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index affc32b71..856ea3e85 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -15,17 +15,27 @@ package("rendergraph") add_rules("mode.debug", "mode.release") add_requires("vulkan-headers") target("RenderGraph") - set_kind("shared") + set_kind("$(kind)") add_includedirs("include") add_files("source/RenderGraph/RunnablePasses/*.cpp") add_files("source/RenderGraph/*.cpp") set_languages("c++20") - add_defines("RenderGraph_EXPORTS") + if is_plat("windows") then + if is_kind("shared") then + add_defines("RenderGraph_EXPORTS") + else + add_defines("CRG_BUILD_STATIC") + end + end add_headerfiles("include/RenderGraph/RunnablePasses/*.hpp", {prefixdir = "RenderGraph/RunnablePasses"}) add_headerfiles("include/RenderGraph/*.hpp", {prefixdir = "RenderGraph"}) add_packages("vulkan-headers") ]]) - import("package.tools.xmake").install(package) + local configs = {} + if package:config("shared") then + configs.kind = "shared" + end + import("package.tools.xmake").install(package, configs) end) on_test(function (package) From 6d66911fb0cc81db6189798dad7de3cc1cf9cbb8 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 05:06:05 +0200 Subject: [PATCH 5/7] RenderGraph: Fixed include headers. --- packages/r/rendergraph/xmake.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index 856ea3e85..9e19a2478 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -27,8 +27,7 @@ package("rendergraph") add_defines("CRG_BUILD_STATIC") end end - add_headerfiles("include/RenderGraph/RunnablePasses/*.hpp", {prefixdir = "RenderGraph/RunnablePasses"}) - add_headerfiles("include/RenderGraph/*.hpp", {prefixdir = "RenderGraph"}) + add_headerfiles("include/(RenderGraph/**.hpp)") add_packages("vulkan-headers") ]]) local configs = {} From 96f92f7ed92c33c99f22a975cdfae0b03239b56f Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 05:11:29 +0200 Subject: [PATCH 6/7] RenderGraph: Added license, fixed src files. --- packages/r/rendergraph/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index 9e19a2478..1b6fd74a4 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -2,6 +2,7 @@ package("rendergraph") set_homepage("https://github.com/DragonJoker/RenderGraph/") set_description("Vulkan render graph management library. .") + set_license("MIT") set_urls("https://github.com/DragonJoker/RenderGraph.git") add_versions("1.0", "61e814bb0298983eae853d9ba5386a272ebc1eb9") @@ -17,8 +18,7 @@ package("rendergraph") target("RenderGraph") set_kind("$(kind)") add_includedirs("include") - add_files("source/RenderGraph/RunnablePasses/*.cpp") - add_files("source/RenderGraph/*.cpp") + add_files("source/RenderGraph/**.cpp") set_languages("c++20") if is_plat("windows") then if is_kind("shared") then From 8a7a3a83686850b64bf069131754bd4f755045c3 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Mon, 4 Apr 2022 05:22:23 +0200 Subject: [PATCH 7/7] RenderGraph: Added tgz archive. --- packages/r/rendergraph/xmake.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/r/rendergraph/xmake.lua b/packages/r/rendergraph/xmake.lua index 1b6fd74a4..957dbfd70 100644 --- a/packages/r/rendergraph/xmake.lua +++ b/packages/r/rendergraph/xmake.lua @@ -4,8 +4,9 @@ package("rendergraph") set_description("Vulkan render graph management library. .") set_license("MIT") - set_urls("https://github.com/DragonJoker/RenderGraph.git") - add_versions("1.0", "61e814bb0298983eae853d9ba5386a272ebc1eb9") + set_urls("https://github.com/DragonJoker/RenderGraph/archive/refs/tags/$(version).tar.gz", + "https://github.com/DragonJoker/RenderGraph.git") + add_versions("v1.0.0", "73814e89f854adb1287c33ea8d89f56ef7822977b5e974218a9a826d76a18e67") add_deps("vulkan-headers")