From b29d833262dc0664469405826a3a2d61a3440a87 Mon Sep 17 00:00:00 2001 From: ambigipathyv Date: Mon, 22 Jan 2024 14:45:41 +0100 Subject: [PATCH] Modified preamke config of glm, glfw, bakara and sandbox to work on windows --- bakara/premake5.lua | 21 ++++++++++++--------- bakara/vendor/premake5.lua | 31 +------------------------------ sandbox/premake5.lua | 8 ++------ 3 files changed, 15 insertions(+), 45 deletions(-) diff --git a/bakara/premake5.lua b/bakara/premake5.lua index cb4abe5..7c31293 100644 --- a/bakara/premake5.lua +++ b/bakara/premake5.lua @@ -1,21 +1,16 @@ project "bakara" - kind "SharedLib" language "C++" cppdialect "C++17" - staticruntime "off" targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") objdir("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}") files { + "vendor/glm/glm/**.hpp", + "vendor/glm/glm/**.inl", "src/**.h", - "src/**.cpp" - } - - buildoptions - { - "-Wall", + "src/**.cpp", } includedirs @@ -28,7 +23,6 @@ project "bakara" links { - "glm", "GLFW" } @@ -52,6 +46,8 @@ project "bakara" optimize "on" filter "system:windows" + kind "StaticLib" + staticruntime "on" defines { "BK_PLATFORM_WINDOWS" @@ -63,6 +59,13 @@ project "bakara" } filter "system:linux" + kind "SharedLib" + staticruntime "off" + files + { + "vendor/glm/glm/**.cpp" + } + defines { "BK_PLATFORM_LINUX" diff --git a/bakara/vendor/premake5.lua b/bakara/vendor/premake5.lua index 9242fca..e1819c2 100644 --- a/bakara/vendor/premake5.lua +++ b/bakara/vendor/premake5.lua @@ -67,6 +67,7 @@ project "GLFW" "%{prj.location}/src/win32_joystick.c", "%{prj.location}/src/win32_monitor.c", "%{prj.location}/src/win32_time.c", + "%{prj.location}/src/win32_module.c", "%{prj.location}/src/win32_thread.c", "%{prj.location}/src/win32_window.c", "%{prj.location}/src/wgl_context.c", @@ -88,33 +89,3 @@ project "GLFW" runtime "Release" optimize "on" -project "glm" - location "./glm/glm" - kind "StaticLib" - language "C++" - cppdialect "C++17" - staticruntime "off" - - targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") - objdir("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}") - - files - { - "%{prj.location}/**.hpp", - "%{prj.location}/**.inl", - "%{prj.location}/**.cpp" - } - - includedirs - { - "%{IncludeDirs.glm}" - } - - filter "configurations:Debug" - runtime "Debug" - symbols "on" - - filter "configurations:Release" - runtime "Release" - optimize "on" - diff --git a/sandbox/premake5.lua b/sandbox/premake5.lua index db2afe8..66b95ad 100644 --- a/sandbox/premake5.lua +++ b/sandbox/premake5.lua @@ -2,7 +2,6 @@ project "sandbox" kind "ConsoleApp" language "C++" cppdialect "C++17" - staticruntime "off" systemversion "latest" targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") @@ -13,11 +12,6 @@ project "sandbox" "src/**.cpp" } - buildoptions - { - "-Wall" - } - includedirs { "%{IncludeDirs.bakara}", @@ -51,12 +45,14 @@ filter "configurations:Release" optimize "on" filter "system:windows" + staticruntime "on" defines { "BK_PLATFORM_WINDOWS" } filter "system:linux" + staticruntime "off" defines { "BK_PLATFORM_LINUX"