Commit 4fd46cc5 authored by nanahira's avatar nanahira

Merge branch 'static-libevent'

parents c9c1a724 53da17be
Pipeline #3880 canceled with stages
in 5 minutes and 34 seconds
...@@ -45,10 +45,18 @@ mat_linux: ...@@ -45,10 +45,18 @@ mat_linux:
- apt update; apt -y install git wget tar - apt update; apt -y install git wget tar
- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux - 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/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: artifacts:
paths: paths:
- premake5 - premake5
- irrlicht_linux - irrlicht_linux
- libevent-stable
mat_macos: mat_macos:
stage: prepare stage: prepare
...@@ -143,9 +151,9 @@ exec_linux: ...@@ -143,9 +151,9 @@ exec_linux:
- bin/ - bin/
- obj/ - obj/
script: 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 - git submodule update --init
- ./premake5 gmake - env YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
......
...@@ -7,9 +7,9 @@ project "ygopro" ...@@ -7,9 +7,9 @@ project "ygopro"
files { "**.cpp", "**.cc", "**.c", "**.h" } files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes { "lzma/**", "spmemvfs/**" } excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht" } links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "event" }
if not LINUX_ALL_STATIC then if not LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" } links { "freetype", "sqlite3" }
end end
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
...@@ -71,7 +71,13 @@ project "ygopro" ...@@ -71,7 +71,13 @@ project "ygopro"
end end
links { "X11", "Xxf86vm" } links { "X11", "Xxf86vm" }
if LINUX_ALL_STATIC then 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 end
if USE_IRRKLANG then if USE_IRRKLANG then
links { "IrrKlang" } links { "IrrKlang" }
......
...@@ -16,6 +16,7 @@ solution "ygo" ...@@ -16,6 +16,7 @@ solution "ygo"
BUILD_LUA=true BUILD_LUA=true
LINUX_ALL_STATIC=true LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/" 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
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