mirror of
https://github.com/edo9300/ygopro-core
synced 2026-08-25 16:23:07 -04:00
Some checks failed
Build EDOPro-core / Windows-mingw (win32, travis-core-windows-mingw) (push) Failing after 1s
Build EDOPro-core / Windows-mingw (x64, travis-core-windows-mingw-x64) (push) Failing after 1s
Build EDOPro-core / Windows-mingw-crtdll (push) Failing after 2s
Build EDOPro-core / Windows-mingw-llvm (arm, travis-core-windows-mingw-llvm-arm, armv7) (push) Failing after 2s
Build EDOPro-core / Windows-mingw-llvm (arm64, travis-core-windows-mingw-llvm-arm64, aarch64) (push) Failing after 2s
Build EDOPro-core / Windows-mingw-llvm (win32, travis-core-windows-mingw-llvm, i686) (push) Failing after 2s
Build EDOPro-core / Windows-mingw-llvm (x64, travis-core-windows-mingw-llvm-x64, x86_64) (push) Failing after 2s
Build EDOPro-core / Windows-mingw-lite (travis-core-windows-mingw-lite, -msvcrt) (push) Failing after 2s
Build EDOPro-core / Windows-mingw-lite (travis-core-windows-mingw-lite-nt4, -march=i486, _486-msvcrt_win98) (push) Failing after 2s
Build EDOPro-core / Linux-musl (travis-core-linux-musl, x86_64-linux-musl, <nil>) (push) Failing after 2s
Build EDOPro-core / Linux-musl (travis-core-linux-musl-aarch64, aarch64-linux-musl, <nil>) (push) Failing after 2s
Build EDOPro-core / Linux-musl (travis-core-linux-musl-apicheck, x86_64-linux-musl, --lua-apicheck) (push) Failing after 2s
Build EDOPro-core / Windows-visual-studio (ARM64, travis-core-windows-aarch64, <nil>) (push) Has been cancelled
Build EDOPro-core / Windows-visual-studio (Win32, travis-core-windows, --oldwindows=true) (push) Has been cancelled
Build EDOPro-core / Windows-visual-studio (x64, travis-core-windows-x64, --oldwindows=true) (push) Has been cancelled
Build EDOPro-core / Linux-gcc-14 (push) Has been cancelled
Build EDOPro-core / Android (travis-core-android, 21.4.7075529) (push) Has been cancelled
Build EDOPro-core / Android (travis-core-android-ndk-16, 16.1.4479499) (push) Has been cancelled
Build EDOPro-core / Android (travis-core-android-ndk-27, 27.2.12479018) (push) Has been cancelled
Build EDOPro-core / Mac-os-cctools (push) Has been cancelled
Build EDOPro-core / Mac-os-aarch64-cctools (push) Has been cancelled
Build EDOPro-core / Mac-os-universal-cctools (push) Has been cancelled
Build EDOPro-core / Notify-success (push) Has been cancelled
don't use externalincludedirs with oldwindows and vs2019 as premake will use an option incompatible with the v141_xp toolset if this configuration is used
146 lines
3.5 KiB
Lua
146 lines
3.5 KiB
Lua
--old premake5 support
|
|
if not externalincludedirs then
|
|
externalincludedirs = sysincludedirs
|
|
end
|
|
local ocgcore_config=function()
|
|
files { "*.h", "*.hpp", "*.cpp", "RNG/*.hpp", "RNG/*.cpp" }
|
|
warnings "Extra"
|
|
cppdialect "C++17"
|
|
rtti "Off"
|
|
|
|
filter "configurations:Release"
|
|
optimize "Speed"
|
|
filter "configurations:Debug"
|
|
optimize "Off"
|
|
filter "action:not vs*"
|
|
buildoptions { "-Wno-unused-parameter", "-pedantic" }
|
|
filter "system:linux"
|
|
linkoptions { "-Wl,--no-undefined" }
|
|
filter { "system:macosx or ios", "files:processor_visit.cpp" }
|
|
buildoptions { "-fno-exceptions" }
|
|
filter {}
|
|
links { "lua" }
|
|
externalincludedirs { "lua/src" }
|
|
end
|
|
|
|
if not subproject then
|
|
newoption {
|
|
trigger = "oldwindows",
|
|
description = "Use the v141_xp toolset to support windows XP sp3"
|
|
}
|
|
workspace "ocgcore"
|
|
location "build"
|
|
language "C++"
|
|
objdir "obj"
|
|
configurations { "Debug", "Release" }
|
|
symbols "On"
|
|
staticruntime "on"
|
|
startproject "ocgcoreshared"
|
|
|
|
filter "system:windows"
|
|
defines { "WIN32", "_WIN32", "NOMINMAX" }
|
|
platforms {"Win32", "x64", "arm", "arm64"}
|
|
|
|
filter "platforms:Win32"
|
|
architecture "x86"
|
|
|
|
filter "platforms:x64"
|
|
architecture "x64"
|
|
|
|
filter "platforms:arm64"
|
|
architecture "ARM64"
|
|
|
|
filter "platforms:arm"
|
|
architecture "ARM"
|
|
|
|
filter { "action:vs*", "platforms:Win32 or x64" }
|
|
vectorextensions "SSE2"
|
|
if _OPTIONS["oldwindows"] then
|
|
if _ACTION >= "vs2019" then
|
|
externalincludedirs = includedirs
|
|
end
|
|
toolset "v141_xp"
|
|
end
|
|
|
|
filter "action:vs*"
|
|
if multiprocessorcompile then
|
|
multiprocessorcompile "On"
|
|
else
|
|
flags "MultiProcessorCompile"
|
|
end
|
|
|
|
filter "configurations:Debug"
|
|
defines "_DEBUG"
|
|
targetdir "bin/debug"
|
|
runtime "Debug"
|
|
|
|
filter "configurations:Release"
|
|
defines "NDEBUG"
|
|
targetdir "bin/release"
|
|
|
|
local function set_target_dir(target,arch)
|
|
filter { "system:windows", "configurations:" .. target, "architecture:" .. arch }
|
|
targetdir("bin/" .. arch .. "/" .. target)
|
|
end
|
|
|
|
set_target_dir("debug","x64")
|
|
set_target_dir("debug","arm")
|
|
set_target_dir("debug","arm64")
|
|
|
|
set_target_dir("release","x64")
|
|
set_target_dir("release","arm")
|
|
set_target_dir("release","arm64")
|
|
|
|
filter { "action:not vs*", "system:windows" }
|
|
buildoptions { "-static-libgcc", "-static-libstdc++", "-static" }
|
|
linkoptions { "-static-libgcc", "-static-libstdc++", "-static" }
|
|
defines { "UNICODE", "_UNICODE" }
|
|
|
|
filter { "system:linux" }
|
|
linkoptions { "-static-libgcc", "-static-libstdc++" }
|
|
|
|
local function disableWinXPWarnings(prj)
|
|
premake.w('<XPDeprecationWarning>false</XPDeprecationWarning>')
|
|
end
|
|
|
|
local function vcpkgStaticTriplet202006(prj)
|
|
premake.w('<VcpkgEnabled>false</VcpkgEnabled>')
|
|
premake.w('<VcpkgUseStatic>false</VcpkgUseStatic>')
|
|
premake.w('<VcpkgAutoLink>false</VcpkgAutoLink>')
|
|
end
|
|
|
|
require('vstudio')
|
|
|
|
premake.override(premake.vstudio.vc2010.elements, "globals", function(base, prj)
|
|
local calls = base(prj)
|
|
table.insertafter(calls, premake.vstudio.vc2010.targetPlatformVersionGlobal, disableWinXPWarnings)
|
|
table.insertafter(calls, premake.vstudio.vc2010.globals, vcpkgStaticTriplet202006)
|
|
return calls
|
|
end)
|
|
end
|
|
|
|
include "./lua/"
|
|
|
|
project "ocgcore"
|
|
kind "StaticLib"
|
|
ocgcore_config()
|
|
|
|
project "ocgcoreshared"
|
|
kind "SharedLib"
|
|
if useimportlib then
|
|
useimportlib "Off"
|
|
else
|
|
flags "NoImportLib"
|
|
end
|
|
-- filter "configurations:Release"
|
|
-- if linktimeoptimization then
|
|
-- linktimeoptimization "On"
|
|
-- else
|
|
-- flags "LinkTimeOptimization"
|
|
-- end
|
|
-- filter {}
|
|
targetname "ocgcore"
|
|
defines "OCGCORE_EXPORT_FUNCTIONS"
|
|
staticruntime "on"
|
|
visibility "Hidden"
|
|
ocgcore_config()
|