diff --git a/premake5.lua b/premake5.lua index 6b102c27..6c34d79f 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,7 +1,8 @@ project "GLFW" kind "StaticLib" language "C" - staticruntime "off" + staticruntime "on" + systemversion "latest" targetdir ("bin/" .. outputdir .. "/%{prj.name}") objdir ("bin-int/" .. outputdir .. "/%{prj.name}") @@ -15,25 +16,40 @@ project "GLFW" "src/init.c", "src/input.c", "src/monitor.c", - - "src/null_init.c", - "src/null_joystick.c", - "src/null_monitor.c", - "src/null_window.c", - - "src/platform.c", "src/vulkan.c", - "src/window.c", + "src/window.c" } + filter "system:linux" + pic "On" + + systemversion "latest" + + files + { + "src/x11_init.c", + "src/x11_monitor.c", + "src/x11_window.c", + "src/xkb_unicode.c", + "src/posix_time.c", + "src/posix_thread.c", + "src/glx_context.c", + "src/egl_context.c", + "src/osmesa_context.c", + "src/linux_joystick.c" + } + + defines + { + "_GLFW_X11" + } filter "system:windows" - systemversion "latest" + files { "src/win32_init.c", "src/win32_joystick.c", - "src/win32_module.c", "src/win32_monitor.c", "src/win32_time.c", "src/win32_thread.c", @@ -49,17 +65,15 @@ project "GLFW" "_CRT_SECURE_NO_WARNINGS" } - links - { - "Dwmapi.lib" - } filter "configurations:Debug" - defines "SANDBOX_DEBUG" - buildoptions "/MT" --it uses multithread, static version of the run-time library.[MDd] - symbols "On" -- it allows us to debug code. line by line. which the exe contain suppoting elements to debug. + runtime "Debug" + symbols "On" - filter "configurations:Release" - defines "SANDBOX_RELEASE" - buildoptions "/MT" --it uses multithread, static version of the run-time library.[MDd] - optimize "On" -- remove all the debuging datas. + filter "configurations:Development" + runtime "Release" + optimize "On" + + filter "configurations:Ship" + runtime "Release" + optimize "On"