diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-08-19 10:47:03 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-08-19 10:47:03 +0200 |
commit | 136b25133d67e9765a954a576ea272c4a0185c52 (patch) | |
tree | 654021d86604d114e8d2bc34b5c535406541d04c /premake5.lua | |
parent | disable movies by default; update librw (diff) | |
parent | Add AUDIO_REVERB define (diff) | |
download | re3-136b25133d67e9765a954a576ea272c4a0185c52.tar re3-136b25133d67e9765a954a576ea272c4a0185c52.tar.gz re3-136b25133d67e9765a954a576ea272c4a0185c52.tar.bz2 re3-136b25133d67e9765a954a576ea272c4a0185c52.tar.lz re3-136b25133d67e9765a954a576ea272c4a0185c52.tar.xz re3-136b25133d67e9765a954a576ea272c4a0185c52.tar.zst re3-136b25133d67e9765a954a576ea272c4a0185c52.zip |
Diffstat (limited to 'premake5.lua')
-rw-r--r-- | premake5.lua | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/premake5.lua b/premake5.lua index a899d5d5..2dc2fa69 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 @@ -375,6 +377,19 @@ project "reLCS" 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" } @@ -392,10 +407,10 @@ project "reLCS" 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" } |