Commit 53da17be authored by nanahira's avatar nanahira

use prebuilt libevent 2.0.22

parent c9c1a724
......@@ -45,10 +45,18 @@ mat_linux:
- apt update; apt -y install git wget tar
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx -
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- cd libevent-2.0.22-stable
- ./configure --prefix=$PWD/libevent-stable --disable-openssl
- make -j$(nproc)
- make install
- cd ..
- mv libevent-2.0.22-stable/libevent-stable .
artifacts:
paths:
- premake5
- irrlicht_linux
- libevent-stable
mat_macos:
stage: prepare
......@@ -143,9 +151,9 @@ exec_linux:
- bin/
- obj/
script:
- apt update; apt -y install git build-essential libfreetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev libxxf86vm-dev
- apt update; apt -y install git build-essential libfreetype6-dev libsqlite3-dev libgl1-mesa-dev libglu-dev libxxf86vm-dev
- git submodule update --init
- ./premake5 gmake
- env YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
- cd build
- make config=release -j$(nproc)
- cd ..
......
......@@ -7,9 +7,9 @@ project "ygopro"
files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "event" }
if not LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" }
links { "freetype", "sqlite3" }
end
if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
......@@ -71,7 +71,13 @@ project "ygopro"
end
links { "X11", "Xxf86vm" }
if LINUX_ALL_STATIC then
linkoptions { LIB_ROOT.."libfreetype.a", LIB_ROOT.."libsqlite3.a", LIB_ROOT.."libevent.a", LIB_ROOT.."libevent_pthreads.a" }
linkoptions { LIB_ROOT.."libfreetype.a", LIB_ROOT.."libsqlite3.a" }
local libeventRootPrefix=LIB_ROOT
if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" }
libeventRootPrefix=LIBEVENT_ROOT.."/lib/"
end
linkoptions { libeventRootPrefix.."libevent.a", libeventRootPrefix.."libevent_pthreads.a" }
end
if USE_IRRKLANG then
links { "IrrKlang" }
......
......@@ -16,6 +16,7 @@ solution "ygo"
BUILD_LUA=true
LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/"
LIBEVENT_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH")
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