diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 1efb347c42..29cea283d5 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -36,15 +36,6 @@ if _ACTION == "gmake" then os.exit(1) end --- On Windows check if wxWidgets is available, if not disable atlas and emit warning. --- This is because there are currently not prebuilt binaries provided. -if not _OPTIONS["without-atlas"] and os.istarget("windows") then - if not os.isfile("../../libraries/win32/wxwidgets/include/wx/wx.h") then - print("wxWidgets not found, disableing atlas") - _OPTIONS["without-atlas"] = "" - end -end - -- Root directory of project checkout relative to this .lua file rootdir = "../.." @@ -119,6 +110,16 @@ else end end +-- On Windows check if wxWidgets is available, if not disable atlas and emit warning. +-- This is because there are currently not prebuilt binaries provided. +if not _OPTIONS["without-atlas"] and os.istarget("windows") then + local win_libs_dir = rootdir .. "/libraries/" .. ( arch == "amd64" and "win64" or "win32" ) + if not os.isfile( win_libs_dir .. "/wxwidgets/include/wx/wx.h") then + print("wxWidgets not found, disabling atlas") + _OPTIONS["without-atlas"] = "" + end +end + -- External libraries should know about arch. dofile("extern_libs5.lua")