Commit 6ab02b31 authored by mercury233's avatar mercury233

fix support for building libevent on other systems

parent bfcb4afc
...@@ -56,7 +56,6 @@ jobs: ...@@ -56,7 +56,6 @@ jobs:
run: | run: |
tar xf ${{ steps.libevent.outputs.filepath }} tar xf ${{ steps.libevent.outputs.filepath }}
move libevent-2.0.22-stable event move libevent-2.0.22-stable event
xcopy /E event\WIN32-Code event\include
- name: Download freetype - name: Download freetype
id: freetype id: freetype
......
...@@ -15,6 +15,7 @@ project "YGOPro" ...@@ -15,6 +15,7 @@ project "YGOPro"
else else
includedirs { EVENT_INCLUDE_DIR } includedirs { EVENT_INCLUDE_DIR }
libdirs { EVENT_LIB_DIR } libdirs { EVENT_LIB_DIR }
links { "event_pthreads" }
end end
if BUILD_IRRLICHT then if BUILD_IRRLICHT then
...@@ -81,7 +82,7 @@ project "YGOPro" ...@@ -81,7 +82,7 @@ project "YGOPro"
end end
end end
filter "not system:windows" filter "not system:windows"
links { "event_pthreads", "dl", "pthread" } links { "dl", "pthread" }
filter "system:macosx" filter "system:macosx"
links { "z" } links { "z" }
defines { "GL_SILENCE_DEPRECATION" } defines { "GL_SILENCE_DEPRECATION" }
......
...@@ -8,7 +8,17 @@ project "event" ...@@ -8,7 +8,17 @@ project "event"
"evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c", "evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c",
"event_tagging.c", "http.c", "evdns.c", "evrpc.c" } "event_tagging.c", "http.c", "evdns.c", "evrpc.c" }
if os.isfile("evutil_time.c") then
files { "evutil_time.c" }
end
filter "system:windows" filter "system:windows"
prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" } prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" }
files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" } files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" }
defines { "WIN32" } -- quirk of old libevent defines { "WIN32" } -- quirk of old libevent
filter "system:linux"
files { "evthread_pthread.c", "epoll.c", "epoll_sub.c", "poll.c", "select.c" }
filter "system:macosx"
files { "evthread_pthread.c", "kqueue.c", "poll.c", "select.c" }
...@@ -91,7 +91,7 @@ if not BUILD_LUA then ...@@ -91,7 +91,7 @@ if not BUILD_LUA then
end end
if GetParam("build-event") then if GetParam("build-event") then
BUILD_EVENT = os.istarget("windows") -- only on windows for now BUILD_EVENT = true
elseif GetParam("no-build-event") then elseif GetParam("no-build-event") then
BUILD_EVENT = false BUILD_EVENT = false
end end
......
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