hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/premake5.lua
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-10-16 19:31:01 +0200
committerhachem <im@hachem.wtf>2026-10-16 19:31:01 +0200
commit9a725ac5c498e637ed7146e6f2aaaf56df49886b (patch)
tree8679f57eb3d296167c45a4869795c49c760ad29c /premake5.lua
parent4afbb2ed9cc055ad925abd678d0fc0c63ab90fbc (diff)
chore: docsHEADmain
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua15
1 files changed, 3 insertions, 12 deletions
diff --git a/premake5.lua b/premake5.lua
index 88cf22a..c12de36 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1,7 +1,5 @@
output_dir = "%{cfg.buildcfg}-%{cfg.system}"
--- the LunarG installer sets this on windows. without it the vulkan backend is
--- left out of the build (DONUT_NO_VULKAN) and the app runs opengl only.
vulkan_sdk = os.getenv("VULKAN_SDK")
if os.target() == "windows" and not vulkan_sdk then
print("VULKAN_SDK is not set: building without the Vulkan backend (OpenGL only)")
@@ -45,8 +43,6 @@ function setup_c_target()
runtime "Debug"
symbols "On"
- -- premake filters don't nest: this one has to name debug again, or the
- -- sanitizers end up in every config
filter { "configurations:debug", "system:macosx or system:linux" }
buildoptions {
"-g",
@@ -87,8 +83,6 @@ function setup_cpp_target()
runtime "Debug"
symbols "On"
- -- premake filters don't nest: this one has to name debug again, or the
- -- sanitizers end up in every config
filter { "configurations:debug", "system:macosx or system:linux" }
buildoptions {
"-g",
@@ -402,7 +396,7 @@ project "donut"
}
includedirs "src"
- debugdir "%{wks.location}" -- every asset path is relative to the repo root
+ debugdir "%{wks.location}"
externalincludedirs {
"%{include_dir.glm}",
@@ -429,16 +423,14 @@ project "donut"
filter "system:windows"
systemversion "latest"
- defines "NOMINMAX" -- glad drags in windows.h, whose min/max macros eat std::min/std::max
- usestandardpreprocessor "On" -- msvc only knows __VA_OPT__ (log.h) with its conforming preprocessor
+ defines "NOMINMAX"
+ usestandardpreprocessor "On"
conformancemode "On"
buildoptions "/utf-8"
links "opengl32"
if vulkan_sdk then
externalincludedirs (vulkan_sdk .. "/Include")
libdirs (vulkan_sdk .. "/Lib")
- -- delay-loaded, so a box without a Vulkan driver still starts (on OpenGL)
- -- instead of the loader refusing to run the exe at all
links { "vulkan-1", "delayimp" }
linkoptions "/DELAYLOAD:vulkan-1.dll"
else
@@ -471,4 +463,3 @@ project "donut"
filter "configurations:dist"
defines "DONUT_DIST"
filter {}
-