Commit c9c1a724 authored by nanahira's avatar nanahira

test all-static build

parent d342405c
......@@ -130,7 +130,12 @@ exec_linux:
stage: build
tags:
- linux
variables:
YGOPRO_BUILD_LUA: '1'
YGOPRO_LINUX_ALL_STATIC: '1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies:
- mat_lua
- mat_irrklang
- mat_linux
cache:
......@@ -138,7 +143,7 @@ exec_linux:
- bin/
- obj/
script:
- apt update; apt -y install git build-essential libfreetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev liblua5.3-dev libxxf86vm-dev
- apt update; apt -y install git build-essential libfreetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev libxxf86vm-dev
- git submodule update --init
- ./premake5 gmake
- cd build
......
......@@ -7,7 +7,10 @@ project "ygopro"
files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "freetype", "sqlite3", "event" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht" }
if not LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" }
end
if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" }
links { "ikpmp3" }
......@@ -25,6 +28,10 @@ project "ygopro"
local mr=os.getenv("YGOPRO_DEFAULT_DUEL_RULE")
if mr and tonumber(mr) then defines { "DEFAULT_DUEL_RULE="..tonumber(mr) } end
configuration "not linux"
if LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" }
end
configuration "windows"
files "ygopro.rc"
excludes "CGUIButton.cpp"
......@@ -57,12 +64,15 @@ project "ygopro"
links "GL"
configuration "linux"
includedirs { "../irrlicht_linux/include" }
links { "X11", "Xxf86vm" }
if BUILD_LUA then
links { "lua" }
else
links { "lua5.3-c++" }
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" }
end
if USE_IRRKLANG then
links { "IrrKlang" }
linkoptions{ "-Wl,-rpath=./" }
......
......@@ -8,8 +8,15 @@ solution "ygo"
IRRKLANG_PRO = true
end
end
if os.ishost("linux") and os.getenv("YGOPRO_BUILD_LUA") then
BUILD_LUA=true
if os.ishost("linux") then
if os.getenv("YGOPRO_BUILD_LUA") then
BUILD_LUA=true
end
if os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_LUA=true
LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/"
end
end
configurations { "Release", "Debug" }
......
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