From 3bc16b462601064144e8c1edab2fbf9436d9b658 Mon Sep 17 00:00:00 2001 From: Nigel Barink Date: Thu, 4 May 2023 22:48:06 +0200 Subject: [PATCH] Added premake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it easy to work on the project on both Linux🐧, Windows or even Mac🍏 --- .gitignore | 9 +++++++- Hello_triangle/premake5.lua | 7 ++++++ Hello_vulkan/premake5.lua | 8 +++++++ premake5.lua | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 Hello_triangle/premake5.lua create mode 100644 Hello_vulkan/premake5.lua create mode 100644 premake5.lua diff --git a/.gitignore b/.gitignore index 600d2d3..2ec9ab9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ -.vscode \ No newline at end of file +.vscode +.vs +bin/ +libs/ +obj/ +**.vcxproj +**.sln +**.user diff --git a/Hello_triangle/premake5.lua b/Hello_triangle/premake5.lua new file mode 100644 index 0000000..265826a --- /dev/null +++ b/Hello_triangle/premake5.lua @@ -0,0 +1,7 @@ +require("premake", ">=5.0-beta2") + +project "HelloTriangle" + files{ + "**.cpp", + "**.h" + } \ No newline at end of file diff --git a/Hello_vulkan/premake5.lua b/Hello_vulkan/premake5.lua new file mode 100644 index 0000000..c6da72c --- /dev/null +++ b/Hello_vulkan/premake5.lua @@ -0,0 +1,8 @@ +require("premake", ">=5.0-beta2") + +project "HelloVulkan" + files{ + "**.cpp", + "**.h" + } + \ No newline at end of file diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..fac3ba2 --- /dev/null +++ b/premake5.lua @@ -0,0 +1,44 @@ +workspace "LearnVulkan" + kind "ConsoleApp" + language "C++" + cppdialect "C++17" + targetdir "%{prj.location}/bin/%{cfg.buildcfg}" + configurations { "Debug", "Release" } + + include("Hello_vulkan/premake5.lua") + include("Hello_triangle/premake5.lua") + + filter "configurations:Debug" + defines { "DEBUG" } + symbols "On" + filter "configurations:Release" + defines { "NDEBUG" } + optimize "On" + + filter "system:windows" + libdirs{ + "libs/GLFW", + "C:/VulkanSDK/1.3.243.0/Lib" + } + includedirs { + "C:/VulkanSDK/1.3.243.0/Include", + "libs/" + } + links {"glfw3", "vulkan-1"} + architecture "x64" + + + + filter "system:linux" + links { + "glfw3", + "vulkan", + "dl", + "pthread", + "X11", + "Xxf86vm", + "Xrandr", + "Xi" + } + +