Commit 21e4b837 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 4f1cc31d ef632ca4
......@@ -41,7 +41,7 @@ mat_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
- ./configure --prefix=$PWD/libevent-stable --disable-openssl --enable-static=yes --enable-shared=no
- make -j$(nproc)
- make install
- cd ..
......@@ -99,8 +99,6 @@ exec_linux:
- linux
variables:
YGOPRO_BUILD_ALL: '1'
YGOPRO_LINUX_ALL_STATIC: '1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies:
- mat_common
#- mat_irrklang
......@@ -112,7 +110,7 @@ exec_linux:
script:
- apt update; apt -y install git build-essential
- git submodule update --init
- YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
- env YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable ./premake5 gmake
- cd build
- make config=release -j$(nproc)
- cd ..
......
......@@ -26,7 +26,7 @@ project "ygopro"
"single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "sqlite3" }
links { "ocgcore", "clzma", "sqlite3", "event" }
configuration "windows"
files "ygopro.rc"
......@@ -36,9 +36,11 @@ project "ygopro"
buildoptions { "-std=c++14", "-fno-rtti" }
configuration "not windows"
links { "dl", "pthread" }
if not LINUX_ALL_STATIC then
links { "event_pthreads" }
if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" }
libdirs { LIBEVENT_ROOT.."/lib/" }
end
links { "event_pthreads" }
if BUILD_SQLITE then
includedirs { "../sqlite3" }
end
......@@ -47,15 +49,9 @@ project "ygopro"
else
links { "lua5.3-c++" }
end
if LINUX_ALL_STATIC then
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" }
else
links { "event" }
end
configuration "linux"
linkoptions { "-static-libstdc++", "-static-libgcc", "-Wl,-rpath=./lib/" }
configuration "macosx"
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos11" }
end
Subproject commit 4fce02f2c2889645af14f62f198322f18d19f17a
Subproject commit 62a5cb65ea7c392f00c2515d023d04a5229907a4
......@@ -18,17 +18,25 @@ solution "ygo"
if os.getenv("YGOPRO_BUILD_ALL") or os.ishost("macosx") then
BUILD_ALL=true
end
if os.ishost("linux") and os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_ALL=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")
if os.getenv("YGOPRO_LIBEVENT_STATIC_PATH") then
LIBEVENT_ROOT=os.getenv("YGOPRO_LIBEVENT_STATIC_PATH")
end
if BUILD_ALL then
BUILD_LUA=true
BUILD_SQLITE=true
BUILD_FREETYPE=true
end
if os.ishost("macosx") then
if os.getenv("YGOPRO_TARGET_ARM") then
MAC_ARM=true
end
end
end
if (os.ishost("windows") or os.getenv("USE_IRRKLANG")) and not os.getenv("NO_IRRKLANG") then
USE_IRRKLANG = true
if os.getenv("irrklang_pro") then
IRRKLANG_PRO = true
end
end
configurations { "Release", "Debug" }
......@@ -59,9 +67,14 @@ end
configuration "macosx"
defines { "LUA_USE_MACOSX", "DBL_MAX_10_EXP=+308", "DBL_MANT_DIG=53", "GL_SILENCE_DEPRECATION" }
includedirs { "/usr/local/include/event2", }
if not LIBEVENT_ROOT then
includedirs { "/usr/local/include/event2" }
end
libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" }
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos11" }
end
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
configuration "linux"
......@@ -85,7 +98,9 @@ end
configuration { "Release", "not vs*" }
symbols "On"
defines "NDEBUG"
buildoptions "-march=native"
if not MAC_ARM then
buildoptions "-march=native"
end
configuration { "Debug", "vs*" }
defines { "_ITERATOR_DEBUG_LEVEL=0" }
......
Subproject commit baa705cbad1239663c55db63aa8cd69eccf4c65c
Subproject commit eae593f91a9e1c71649ab8d7463ffc0da97b8abe
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