Modified premake config to fix glfw linking errors

dev
anulax1225 ago%!(EXTRA string=1 year)
parent 4ba7c2efef
commit 471f4db939
  1. 27
      bakara/premake5.lua
  2. 31
      bakara/vendor/premake5.lua
  3. 1
      premake5.lua
  4. 8
      sandbox/premake5.lua

@ -1,5 +1,5 @@
project "bakara"
kind "StaticLib"
kind "SharedLib"
language "C++"
cppdialect "C++17"
staticruntime "off"
@ -7,37 +7,34 @@ project "bakara"
targetdir("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
defines
{
"_CRT_SECURE_NO_WARNINGS",
"GLFW_INCLUDE_NONE"
}
files
{
"src/**.h",
"src/**.cpp"
}
buildoptions
{
"-lglfw",
"-lGL"
"-Wall"
}
files
defines
{
"src/**.h",
"src/**.cpp"
"GLFW_INCLUDE_NONE"
}
includedirs
{
"%{IncludeDirs.bakara}",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.glm}",
"%{IncludeDirs.spdlog}"
"%{IncludeDirs.spdlog}",
"%{IncludeDirs.glfw}"
}
links
{
"GLFW",
"opengl32.lib",
"glm",
"GLFW"
}
filter "configurations:Debug"

@ -10,27 +10,31 @@ project "GLFW"
files
{
"%{prj.location}/src/glfw_config.h",
"%{prj.location}/include/GLFW/glfw3native.h",
"%{prj.location}/include/GLFW/glfw3.h",
"%{prj.location}/src/internal.h",
"%{prj.location}/src/platform.h",
"%{prj.location}/src/mappings.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",
"%{prj.location}/src/platform.c",
"%{prj.location}/src/vulkan.c",
"%{prj.location}/src/null_init.c",
"%{prj.location}/src/null_monitor.c",
"%{prj.location}/src/null_window.c",
"%{prj.location}/src/null_joystick.c",
"%{prj.location}/src/glfw_config.h",
"%{prj.location}/include/GLFW/glfw3native.h",
"%{prj.location}/include/GLFW/glfw3.h",
"include/GLFW/glfw3.h",
"include/GLFW/glfw3native.h",
}
filter "system:linux"
pic "On"
systemversion "latest"
staticruntime "On"
files
{
@ -39,6 +43,8 @@ project "GLFW"
"%{prj.location}/src/x11_window.c",
"%{prj.location}/src/xkb_unicode.c",
"%{prj.location}/src/posix_time.c",
"%{prj.location}/src/posix_module.c",
"%{prj.location}/src/posix_poll.c",
"%{prj.location}/src/posix_thread.c",
"%{prj.location}/src/glx_context.c",
"%{prj.location}/src/egl_context.c",
@ -46,6 +52,21 @@ project "GLFW"
"%{prj.location}/src/linux_joystick.c"
}
links
{
"GL",
"GLU",
"glut",
"Xxf86vm",
"Xinerama",
"Xi",
"dl",
"X11",
"Xrandr",
"Xcursor",
"pthread"
}
defines
{
"_GLFW_X11"

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

@ -13,17 +13,21 @@ project "sandbox"
"src/**.cpp"
}
buildoptions
{
"-Wall"
}
includedirs
{
"%{IncludeDirs.bakara}",
"%{IncludeDirs.spdlog}",
"%{IncludeDirs.glm}",
""
}
links
{
"bakara"
"bakara",
}

Loading…
Cancel
Save