Added glfw to git modules, added project and modified premake config

dev
anulax1225 ago%!(EXTRA string=1 year)
parent 83daf2f7ea
commit 287aca2d4c
  1. 3
      .gitmodules
  2. 64
      bakara/premake5.lua
  3. 1
      bakara/vendor/glfw
  4. 85
      bakara/vendor/premake5.lua
  5. 1
      premake5.lua

3
.gitmodules vendored

@ -4,3 +4,6 @@
[submodule "bakara/vendor/spdloglib"] [submodule "bakara/vendor/spdloglib"]
path = bakara/vendor/spdloglib path = bakara/vendor/spdloglib
url = https://github.com/gabime/spdlog url = https://github.com/gabime/spdlog
[submodule "bakara/vendor/glfw"]
path = bakara/vendor/glfw
url = https://github.com/glfw/glfw

@ -7,6 +7,12 @@ project "bakara"
targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}") objdir("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
defines
{
"_CRT_SECURE_NO_WARNINGS",
"GLFW_INCLUDE_NONE"
}
files files
{ {
"src/**.h", "src/**.h",
@ -17,41 +23,43 @@ project "bakara"
{ {
"%{IncludeDirs.bakara}", "%{IncludeDirs.bakara}",
"%{IncludeDirs.glm}", "%{IncludeDirs.glm}",
"%{IncludeDirs.spdlog}" "%{IncludeDirs.spdlog}",
"%{IncludeDirs.glfw}"
} }
links links
{ {
"glm" "glm",
"glfw"
} }
filter "configurations:Debug" filter "configurations:Debug"
defines defines
{ {
"BK_DEBUG", "BK_DEBUG",
"DEBUG" "DEBUG"
} }
runtime "Debug" runtime "Debug"
symbols "on" symbols "on"
filter "configurations:Release" filter "configurations:Release"
defines defines
{ {
"BK_RELEASE", "BK_RELEASE",
"NDEBUG" "NDEBUG"
} }
runtime "Release" runtime "Release"
optimize "on" optimize "on"
filter "system:windows" filter "system:windows"
defines defines
{ {
"BK_PLATFORM_WINDOWS" "BK_PLATFORM_WINDOWS"
} }
filter "system:linux" filter "system:linux"
defines defines
{ {
"BK_PLATFORM_LINUX" "BK_PLATFORM_LINUX"
} }

@ -0,0 +1 @@
Subproject commit 8e6c8d7effc54f8aecd30eda17069588298f4ada

@ -19,3 +19,88 @@ project "glm"
{ {
"%{IncludeDirs.glm}" "%{IncludeDirs.glm}"
} }
filter "configurations:Debug"
runtime "Debug"
symbols "on"
filter "configurations:Release"
runtime "Release"
optimize "on"
project "glfw"
location "./glfw"
kind "StaticLib"
language "C"
targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"%{prj.location}/include/GLFW/glfw3.h",
"%{prj.location}/include/GLFW/glfw3native.h",
"%{prj.location}/src/glfw_config.h",
"%{prj.location}/src/context.c",
"%{prj.location}/src/init.c",
"%{prj.location}/src/input.c",
"%{prj.location}/src/monitor.c",
"%{prj.location}/src/vulkan.c",
"%{prj.location}/src/window.c"
}
filter "system:linux"
pic "On"
systemversion "latest"
staticruntime "On"
files
{
"%{prj.location}/src/x11_init.c",
"%{prj.location}/src/x11_monitor.c",
"%{prj.location}/src/x11_window.c",
"%{prj.location}/src/xkb_unicode.c",
"%{prj.location}/src/posix_time.c",
"%{prj.location}/src/posix_thread.c",
"%{prj.location}/src/glx_context.c",
"%{prj.location}/src/egl_context.c",
"%{prj.location}/src/osmesa_context.c",
"%{prj.location}/src/linux_joystick.c"
}
defines
{
"_GLFW_X11"
}
filter "system:windows"
systemversion "latest"
staticruntime "On"
files
{
"%{prj.location}/src/win32_init.c",
"%{prj.location}/src/win32_joystick.c",
"%{prj.location}/src/win32_monitor.c",
"%{prj.location}/src/win32_time.c",
"%{prj.location}/src/win32_thread.c",
"%{prj.location}/src/win32_window.c",
"%{prj.location}/src/wgl_context.c",
"%{prj.location}/src/egl_context.c",
"%{prj.location}/src/osmesa_context.c"
}
defines
{
"_GLFW_WIN32",
"_CRT_SECURE_NO_WARNINGS"
}
filter "configurations:Debug"
runtime "Debug"
symbols "on"
filter "configurations:Release"
runtime "Release"
optimize "on"

@ -15,6 +15,7 @@ IncludeDirs["bakara"] = "%{wks.location}/bakara/src"
IncludeDirs["vendor"] = "%{wks.location}/bakara/vendor" IncludeDirs["vendor"] = "%{wks.location}/bakara/vendor"
IncludeDirs["spdlog"] = "%{wks.location}/bakara/vendor/spdloglib/include" IncludeDirs["spdlog"] = "%{wks.location}/bakara/vendor/spdloglib/include"
IncludeDirs["glm"] = "%{wks.location}/bakara/vendor/glm" IncludeDirs["glm"] = "%{wks.location}/bakara/vendor/glm"
IncludeDirs["glfw"] = "%{wks.location}/bakara/vendor/glfw"
group "Dependencies" group "Dependencies"
include "bakara/vendor" include "bakara/vendor"

Loading…
Cancel
Save