Commit f0e9bc88 authored by Chen Bill's avatar Chen Bill Committed by GitHub

fix: correct EVENT_VERSION format and improve warning message (#2861)

parent 464d3e23
project "event" project "event"
kind "StaticLib" kind "StaticLib"
local EVENT_VERSION = (io.readfile("configure") or ""):match("NUMERIC_VERSION%s+0x(%x+)") local EVENT_VERSION = (io.readfile("configure") or ""):match("NUMERIC_VERSION%s+(0x%x+)")
if not EVENT_VERSION then if not EVENT_VERSION then
print("Warning: Could not determine libevent version from the configure file, assuming 2.1.12.") print("Warning: Could not determine libevent version from the configure file, assuming 2.1.12.")
EVENT_VERSION = "02010c00" -- 2.1.12 EVENT_VERSION = "0x02010c00" -- 2.1.12
end end
EVENT_VERSION = tonumber(EVENT_VERSION, 16) EVENT_VERSION = tonumber(EVENT_VERSION)
if EVENT_VERSION>=0x02020000 then if EVENT_VERSION>=0x02020000 then
print("Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues.") print("Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues.")
end end
if EVENT_VERSION>=0x02010000 and WINXP_SUPPORT then if EVENT_VERSION>=0x02010000 and WINXP_SUPPORT then
print("Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be not valid.") print("Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be invalid.")
end end
includedirs { "include", "compat" } includedirs { "include", "compat" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment