Skip to content

Commit

Permalink
Add x11 definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper authored Jul 29, 2024
1 parent bc69d13 commit d290694
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Dependencies/glfw/glfw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ Solution.Util.CreateStaticLib(dep.Name, Solution.Projects.Current.BinDir, dep.De
end)

Solution.Util.SetFilter("platforms:Linux", function()
local files =
{
sourceDir .. "/x11_platform.h",
sourceDir .. "/linux_joystick.h",
sourceDir .. "/egl_context.h",

sourceDir .. "/x11_init.c",
sourceDir .. "/linux_joystick.c",
sourceDir .. "/x11_monitor.c",
sourceDir .. "/posix_time.c",
sourceDir .. "/posix_thread.c",
sourceDir .. "/x11_window.c",
sourceDir .. "/egl_context.c"
}

Solution.Util.SetFiles(files)
Solution.Util.SetDefines({ "_GLFW_X11", "_CRT_SECURE_NO_WARNINGS" })
Solution.Util.SetLinks({ "pthread" })
end)
end)
Expand All @@ -61,4 +78,8 @@ Solution.Util.CreateDep(dep.NameLow, dep.Dependencies, function()
Solution.Util.SetFilter("platforms:Win64", function()
Solution.Util.SetDefines({ "_GLFW_WIN32", "_CRT_SECURE_NO_WARNINGS" })
end)
end)

Solution.Util.SetFilter("platforms:Linux", function()
Solution.Util.SetDefines({ "_GLFW_X11", "_CRT_SECURE_NO_WARNINGS" })
end)
end)

0 comments on commit d290694

Please sign in to comment.