diff options
| author | skallweitNV <64953474+skallweitNV@users.noreply.github.com> | 2023-12-19 00:16:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-18 15:16:14 -0800 |
| commit | 93b8f68b2e9ddc450ce63f1b6e1806960312d803 (patch) | |
| tree | d5c9c38efe1e7c86637c4be6157595b44a5c4856 /premake5.lua | |
| parent | b6da04424aff71ddba9629c94401a9a897b152a0 (diff) | |
macos/vulkan support (#3418)
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/premake5.lua b/premake5.lua index 2034d004b..13c6279c6 100644 --- a/premake5.lua +++ b/premake5.lua @@ -509,9 +509,13 @@ function addSourceDir(path) path .. "/*.natvis", -- Visual Studio debugger visualization files path .. "/*.natstepfilter", -- Visual Studio debugger step filter files path .. "/*.natjmc", -- Visual Studio debugger step filter files - - } + if os.target() == "macosx" then + files { path .. "/*.mm" } -- Objective-C++ files + filter { "files:**.mm" } + compileas "Objective-C++" + filter {} + end removefiles { "**/*.meta.slang.h", @@ -846,6 +850,8 @@ example "hello-world" -- -- Let's go ahead and set up the projects for our other example now. +example "platform-test" + example "triangle" example "ray-tracing" @@ -1120,6 +1126,7 @@ tool "gfx" files {"slang-gfx.h"} -- Will compile across targets + addSourceDir "tools/gfx/apple" addSourceDir "tools/gfx/cpu" addSourceDir "tools/gfx/nvapi" addSourceDir "tools/gfx/cuda" @@ -1182,7 +1189,7 @@ tool "gfx" elseif targetInfo.os == "mingw" or targetInfo.os == "cygwin" then -- Don't support any render techs... elseif os.target() == "macosx" then - --addSourceDir "tools/gfx/open-gl" + addSourceDir "tools/gfx/vulkan" else -- Linux like addSourceDir "tools/gfx/vulkan" @@ -1194,6 +1201,10 @@ tool "gfx" --addSourceDir "tools/gfx/open-gl" end + if os.target() == "macosx" then + links { "Cocoa.framework" } + end + if enableXlib then defines { "SLANG_ENABLE_XLIB" } libdirs { "/usr/X11/lib" } @@ -1247,10 +1258,13 @@ tool "platform" addSourceDir "tools/platform" addSourceDir "tools/platform/linux" addSourceDir "tools/platform/windows" + addSourceDir "tools/platform/apple" addSourceDir "tools/platform/placeholder" -- Include windowing support on Windows. if targetInfo.isWindows then systemversion "latest" + elseif os.target() == "macosx" then + links { "Cocoa.framework", "QuartzCore.framework" } else if enableXlib then defines { "SLANG_ENABLE_XLIB" } |
