From d9443d670ef8413971fe7c3f02368b60a7fc5904 Mon Sep 17 00:00:00 2001 From: Simon Kallweit Date: Mon, 27 May 2024 06:03:13 -0700 Subject: [gfx] metal backend skeleton (#4223) * add metal-cpp submodule * add metal-cpp cmake target * gfx metal backend skeleton * add premake support * add foundation framework * add metal-cpp include to premake * update vs project file --------- Co-authored-by: Simon Kallweit Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> --- premake5.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'premake5.lua') diff --git a/premake5.lua b/premake5.lua index 28dacf6b5..f06c2c81c 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1140,7 +1140,7 @@ tool "gfx" defines { "SLANG_GFX_DYNAMIC", "SLANG_GFX_DYNAMIC_EXPORT" } - includedirs { ".", "external", "external/vulkan/include", "source" } + includedirs { ".", "external", "external/vulkan/include", "external/metal-cpp", "source" } files {"slang-gfx.h"} @@ -1209,6 +1209,7 @@ tool "gfx" -- Don't support any render techs... elseif os.target() == "macosx" then addSourceDir "tools/gfx/vulkan" + addSourceDir "tools/gfx/metal" else -- Linux like addSourceDir "tools/gfx/vulkan" @@ -1221,7 +1222,7 @@ tool "gfx" end if os.target() == "macosx" then - links { "Cocoa.framework", "QuartzCore.framework" } + links { "Foundation.framework", "Cocoa.framework", "QuartzCore.framework", "Metal.framework" } end if enableXlib then @@ -1283,7 +1284,7 @@ tool "platform" if targetInfo.isWindows then systemversion "latest" elseif os.target() == "macosx" then - links { "Cocoa.framework", "QuartzCore.framework" } + links { "Foundation.framework", "Cocoa.framework", "QuartzCore.framework" } else if enableXlib then defines { "SLANG_ENABLE_XLIB" } -- cgit v1.2.3