Skip to content

Commit c5af138

Browse files
committed
compile GLFW library statically on LINUX
1 parent 458bebe commit c5af138

65 files changed

Lines changed: 35975 additions & 181 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

premake5.lua

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,61 @@ workspace "carnage3d"
44
cppdialect 'C++17'
55

66
configuration { "linux", "gmake" }
7-
buildoptions { "-Wno-switch", "-fsanitize=address", "-fsanitize=undefined" }
8-
linkoptions { "-fsanitize=address", "-fsanitize=undefined" }
7+
buildoptions { "-Wno-switch", "-fsanitize=address", "-fsanitize=undefined" }
8+
linkoptions { "-fsanitize=address", "-fsanitize=undefined" }
99

1010
filter 'system:linux'
1111
platforms { 'x86_64' }
1212

1313
project "carnage3d"
14-
kind "WindowedApp"
15-
language "C++"
16-
files { "src/*.h", "src/*.cpp" }
14+
kind "WindowedApp"
15+
language "C++"
16+
files
17+
{
18+
"src/*.h",
19+
"src/*.cpp",
20+
"src/GLFW/internal.h",
21+
"src/GLFWglfw_config.h",
22+
"src/GLFW/glfw3.h",
23+
"src/GLFW/glfw3native.h",
24+
"src/GLFW/context.c",
25+
"src/GLFW/init.c",
26+
"src/GLFW/input.c",
27+
"src/GLFW/monitor.c",
28+
"src/GLFW/vulkan.c",
29+
"src/GLFW/window.c",
30+
"src/GLFW/x11_platform.h",
31+
"src/GLFW/xkb_unicode.h",
32+
"src/GLFW/linux_joystick.h",
33+
"src/GLFW/posix_time.h",
34+
"src/GLFW/glx_context.h",
35+
"src/GLFW/egl_context.h",
36+
"src/GLFW/x11_init.c",
37+
"src/GLFW/x11_monitor.c",
38+
"src/GLFW/x11_window.c",
39+
"src/GLFW/glx_context.h",
40+
"src/GLFW/glx_context.c",
41+
"src/GLFW/glext.h",
42+
"src/GLFW/xkb_unicode.c",
43+
"src/GLFW/linux_joystick.c",
44+
"src/GLFW/posix_time.c",
45+
"src/GLFW/glx_context.c",
46+
"src/GLFW/egl_context.c",
47+
"src/GLFW/posix_thread.h",
48+
"src/GLFW/posix_thread.c",
49+
"src/GLFW/osmesa_context.c",
50+
"src/GLFW/osmesa_context.h"
51+
}
52+
includedirs { "third_party/Box2D" }
53+
includedirs { "GLFW" }
54+
links { "GL", "GLEW", "stdc++fs", "Box2D", "X11", "Xrandr", "Xinerama", "Xcursor", "pthread", "dl" }
1755

18-
includedirs { "third_party/Box2D" }
19-
links { "glfw", "GL", "GLEW", "stdc++fs", "Box2D" }
56+
filter { "configurations:Debug" }
57+
defines { "DEBUG", "_DEBUG" }
58+
symbols "On"
59+
libdirs { "third_party/Box2D/Build/bin/x86_64/Debug" }
2060

21-
22-
filter { "configurations:Debug" }
23-
defines { "DEBUG", "_DEBUG" }
24-
symbols "On"
25-
libdirs { "third_party/Box2D/Build/bin/x86_64/Debug" }
26-
27-
filter { "configurations:Release" }
28-
defines { "NDEBUG" }
29-
optimize "On"
30-
libdirs { "third_party/Box2D/Build/bin/x86_64/Release" }
61+
filter { "configurations:Release" }
62+
defines { "NDEBUG" }
63+
optimize "On"
64+
libdirs { "third_party/Box2D/Build/bin/x86_64/Release" }

0 commit comments

Comments
 (0)