summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-08-15 20:24:20 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-08-16 20:06:52 +0200
commite0ecbeee39e605cf2ee06e3632f4931d03606ce7 (patch)
tree36569421f31878d57a24cc3d279a2831f8173b04 /premake5.lua
parentFix impossible bullets & turn speed on heavy guns (diff)
downloadre3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.gz
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.bz2
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.lz
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.xz
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.zst
re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.zip
Diffstat (limited to '')
-rw-r--r--premake5.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/premake5.lua b/premake5.lua
index 25090dc6..a33623fc 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -42,6 +42,8 @@ newoption {
description = "Don't print full paths into binary"
}
+require("autoconf")
+
if(_OPTIONS["with-librw"]) then
Librw = "vendor/librw"
else
@@ -364,6 +366,19 @@ project "re3"
filter "platforms:win*glfw*"
staticruntime "off"
+
+ filter "platforms:*glfw*"
+ premake.modules.autoconf.parameters = "-lglfw -lX11"
+ autoconfigure {
+ -- iterates all configs and runs on them
+ ["dontWrite"] = function (cfg)
+ check_symbol_exists(cfg, "haveX11", "glfwGetX11Display", { "X11/Xlib.h", "X11/XKBlib.h", "GLFW/glfw3.h", "GLFW/glfw3native.h" }, "GLFW_EXPOSE_NATIVE_X11")
+ if cfg.autoconf["haveX11"] then
+ table.insert(cfg.links, "X11")
+ table.insert(cfg.defines, "GET_KEYBOARD_INPUT_FROM_X11")
+ end
+ end
+ }
filter "platforms:win*oal"
includedirs { "vendor/openal-soft/include" }
@@ -381,10 +396,10 @@ project "re3"
libdirs { "vendor/openal-soft/libs/Win64" }
filter "platforms:linux*oal"
- links { "openal", "mpg123", "sndfile", "pthread", "X11" }
-
+ links { "openal", "mpg123", "sndfile", "pthread" }
+
filter "platforms:bsd*oal"
- links { "openal", "mpg123", "sndfile", "pthread", "X11" }
+ links { "openal", "mpg123", "sndfile", "pthread" }
filter "platforms:macosx*oal"
links { "openal", "mpg123", "sndfile", "pthread" }