Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MobiusMei
ygopro
Commits
519a5e34
Commit
519a5e34
authored
Apr 13, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-premake-update' of
https://github.com/Fluorohydride/ygopro
parents
2f40bf04
9aa82366
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
63 deletions
+68
-63
premake5.lua
premake5.lua
+68
-63
No files found.
premake5.lua
View file @
519a5e34
-- default global settings
-- default global settings
BUILD_LUA
=
true
BUILD_LUA
=
true
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
...
@@ -8,107 +9,111 @@ USE_IRRKLANG = true
...
@@ -8,107 +9,111 @@ USE_IRRKLANG = true
IRRKLANG_PRO
=
false
IRRKLANG_PRO
=
false
LUA_LIB_NAME
=
"lua"
LUA_LIB_NAME
=
"lua"
-- read settings from command line
-- read settings from command line or environment variables
newoption
{
trigger
=
"build-lua"
,
category
=
"YGOPro - lua"
,
description
=
""
}
newoption
{
trigger
=
"no-build-lua"
,
category
=
"YGOPro - lua"
,
description
=
""
}
newoption
{
trigger
=
"lua-include-dir"
,
category
=
"YGOPro - lua"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"lua-lib-dir"
,
category
=
"YGOPro - lua"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"lua-lib-name"
,
category
=
"YGOPro - lua"
,
description
=
""
,
value
=
"NAME"
,
default
=
"lua"
}
newoption
{
trigger
=
"build-lua"
,
description
=
""
}
newoption
{
trigger
=
"build-event"
,
category
=
"YGOPro - event"
,
description
=
""
}
newoption
{
trigger
=
"no-build-lua"
,
description
=
""
}
newoption
{
trigger
=
"no-build-event"
,
category
=
"YGOPro - event"
,
description
=
""
}
newoption
{
trigger
=
"lua-include-dir"
,
description
=
""
,
value
=
"path"
}
newoption
{
trigger
=
"event-include-dir"
,
category
=
"YGOPro - event"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"lua-lib-dir"
,
description
=
""
,
value
=
"path"
}
newoption
{
trigger
=
"event-lib-dir"
,
category
=
"YGOPro - event"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"lua-lib-name"
,
description
=
""
,
value
=
"name"
,
default
=
"lua"
}
newoption
{
trigger
=
"build-
event
"
,
description
=
""
}
newoption
{
trigger
=
"build-
freetype"
,
category
=
"YGOPro - freetype
"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
event
"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
freetype"
,
category
=
"YGOPro - freetype
"
,
description
=
""
}
newoption
{
trigger
=
"
event-include-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
freetype-include-dir"
,
category
=
"YGOPro - freetype"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"
event-lib-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
freetype-lib-dir"
,
category
=
"YGOPro - freetype"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"build-
freetyp
e"
,
description
=
""
}
newoption
{
trigger
=
"build-
sqlite"
,
category
=
"YGOPro - sqlit
e"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
freetyp
e"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
sqlite"
,
category
=
"YGOPro - sqlit
e"
,
description
=
""
}
newoption
{
trigger
=
"
freetype-include-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
sqlite-include-dir"
,
category
=
"YGOPro - sqlite"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"
freetype-lib-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
sqlite-lib-dir"
,
category
=
"YGOPro - sqlite"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"build-
sqlite
"
,
description
=
""
}
newoption
{
trigger
=
"build-
irrlicht"
,
category
=
"YGOPro - irrlicht
"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
sqlite
"
,
description
=
""
}
newoption
{
trigger
=
"no-build-
irrlicht"
,
category
=
"YGOPro - irrlicht
"
,
description
=
""
}
newoption
{
trigger
=
"
sqlite-include-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
irrlicht-include-dir"
,
category
=
"YGOPro - irrlicht"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"
sqlite-lib-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"
irrlicht-lib-dir"
,
category
=
"YGOPro - irrlicht"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"
build-irrlicht
"
,
description
=
""
}
newoption
{
trigger
=
"
use-irrklang"
,
category
=
"YGOPro - irrklang
"
,
description
=
""
}
newoption
{
trigger
=
"no-
build-irrlicht
"
,
description
=
""
}
newoption
{
trigger
=
"no-
use-irrklang"
,
category
=
"YGOPro - irrklang
"
,
description
=
""
}
newoption
{
trigger
=
"irr
licht-include-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"irr
klang-include-dir"
,
category
=
"YGOPro - irrklang"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"irr
licht-lib-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"irr
klang-lib-dir"
,
category
=
"YGOPro - irrklang"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"
use-irrklang
"
,
description
=
""
}
newoption
{
trigger
=
"
irrklang-pro"
,
category
=
"YGOPro - irrklang - pro
"
,
description
=
""
}
newoption
{
trigger
=
"no-
use-irrklang
"
,
description
=
""
}
newoption
{
trigger
=
"no-
irrklang-pro"
,
category
=
"YGOPro - irrklang - pro
"
,
description
=
""
}
newoption
{
trigger
=
"irrklang-
include-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"irrklang-
pro-release-lib-dir"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"irrklang-
lib-dir"
,
description
=
""
,
value
=
"path
"
}
newoption
{
trigger
=
"irrklang-
pro-debug-lib-dir"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
,
value
=
"PATH
"
}
newoption
{
trigger
=
"irrklang-pro"
,
description
=
""
}
newoption
{
trigger
=
"winxp-support"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"no-irrklang-pro"
,
description
=
""
}
newoption
{
trigger
=
"mac-arm"
,
category
=
"YGOPro"
,
description
=
"M1"
}
newoption
{
trigger
=
"irrklang-pro-release-lib-dir"
,
description
=
""
,
value
=
"path"
}
newoption
{
trigger
=
"irrklang-pro-debug-lib-dir"
,
description
=
""
,
value
=
"path"
}
newoption
{
trigger
=
"winxp-support"
,
description
=
""
}
function
GetParam
(
param
)
newoption
{
trigger
=
"mac-arm"
,
description
=
"M1"
}
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
end
if
(
_OPTIONS
[
"build-lua"
]
)
then
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
BUILD_LUA
=
true
elseif
(
_OPTIONS
[
"no-build-lua"
]
)
then
elseif
GetParam
(
"no-build-lua"
)
then
BUILD_LUA
=
false
BUILD_LUA
=
false
end
end
if
not
BUILD_LUA
then
if
not
BUILD_LUA
then
-- at most times you need to change this if you change BUILD_LUA to false
-- at most times you need to change this if you change BUILD_LUA to false
-- make sure your lua lib is built with C++ and version >= 5.3
-- make sure your lua lib is built with C++ and version >= 5.3
LUA_INCLUDE_DIR
=
_OPTIONS
[
"lua-include-dir"
]
or
"/usr/local/include/lua"
LUA_INCLUDE_DIR
=
GetParam
(
"lua-include-dir"
)
or
"/usr/local/include/lua"
LUA_LIB_DIR
=
_OPTIONS
[
"lua-lib-dir"
]
or
"/usr/local/lib"
LUA_LIB_DIR
=
GetParam
(
"lua-lib-dir"
)
or
"/usr/local/lib"
LUA_LIB_NAME
=
_OPTIONS
[
"lua-lib-name"
]
LUA_LIB_NAME
=
GetParam
(
"lua-lib-name"
)
end
end
if
(
_OPTIONS
[
"build-event"
]
)
then
if
GetParam
(
"build-event"
)
then
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
-- only on windows for now
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
-- only on windows for now
elseif
(
_OPTIONS
[
"no-build-event"
]
)
then
elseif
GetParam
(
"no-build-event"
)
then
BUILD_EVENT
=
false
BUILD_EVENT
=
false
end
end
if
not
BUILD_EVENT
then
if
not
BUILD_EVENT
then
EVENT_INCLUDE_DIR
=
_OPTIONS
[
"event-include-dir"
]
or
"/usr/local/include/event2"
EVENT_INCLUDE_DIR
=
GetParam
(
"event-include-dir"
)
or
"/usr/local/include/event2"
EVENT_LIB_DIR
=
_OPTIONS
[
"event-lib-dir"
]
or
"/usr/local/lib"
EVENT_LIB_DIR
=
GetParam
(
"event-lib-dir"
)
or
"/usr/local/lib"
end
end
if
(
_OPTIONS
[
"build-freetype"
]
)
then
if
GetParam
(
"build-freetype"
)
then
BUILD_FREETYPE
=
true
BUILD_FREETYPE
=
true
elseif
(
_OPTIONS
[
"no-build-freetype"
]
)
then
elseif
GetParam
(
"no-build-freetype"
)
then
BUILD_FREETYPE
=
false
BUILD_FREETYPE
=
false
end
end
if
not
BUILD_FREETYPE
then
if
not
BUILD_FREETYPE
then
FREETYPE_INCLUDE_DIR
=
_OPTIONS
[
"freetype-include-dir"
]
or
"/usr/local/include/freetype2"
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
"/usr/local/include/freetype2"
FREETYPE_LIB_DIR
=
_OPTIONS
[
"freetype-lib-dir"
]
or
"/usr/local/lib"
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
"/usr/local/lib"
end
end
if
(
_OPTIONS
[
"build-sqlite"
]
)
then
if
GetParam
(
"build-sqlite"
)
then
BUILD_SQLITE
=
true
BUILD_SQLITE
=
true
elseif
(
_OPTIONS
[
"no-build-sqlite"
]
)
then
elseif
GetParam
(
"no-build-sqlite"
)
then
BUILD_SQLITE
=
false
BUILD_SQLITE
=
false
end
end
if
not
BUILD_SQLITE
then
if
not
BUILD_SQLITE
then
SQLITE_INCLUDE_DIR
=
_OPTIONS
[
"sqlite-include-dir"
]
or
"/usr/local/include"
SQLITE_INCLUDE_DIR
=
GetParam
(
"sqlite-include-dir"
)
or
"/usr/local/include"
SQLITE_LIB_DIR
=
_OPTIONS
[
"sqlite-lib-dir"
]
or
"/usr/local/lib"
SQLITE_LIB_DIR
=
GetParam
(
"sqlite-lib-dir"
)
or
"/usr/local/lib"
end
end
if
(
_OPTIONS
[
"build-irrlicht"
]
)
then
if
GetParam
(
"build-irrlicht"
)
then
BUILD_IRRLICHT
=
true
BUILD_IRRLICHT
=
true
elseif
(
_OPTIONS
[
"no-build-irrlicht"
]
)
then
elseif
GetParam
(
"no-build-irrlicht"
)
then
BUILD_IRRLICHT
=
false
BUILD_IRRLICHT
=
false
end
end
if
not
BUILD_IRRLICHT
then
if
not
BUILD_IRRLICHT
then
IRRLICHT_INCLUDE_DIR
=
_OPTIONS
[
"irrlicht-include-dir"
]
or
"/usr/local/include/irrlicht"
IRRLICHT_INCLUDE_DIR
=
GetParam
(
"irrlicht-include-dir"
)
or
"/usr/local/include/irrlicht"
IRRLICHT_LIB_DIR
=
_OPTIONS
[
"irrlicht-lib-dir"
]
or
"/usr/local/lib"
IRRLICHT_LIB_DIR
=
GetParam
(
"irrlicht-lib-dir"
)
or
"/usr/local/lib"
end
end
if
(
_OPTIONS
[
"use-irrklang"
]
)
then
if
GetParam
(
"use-irrklang"
)
then
USE_IRRKLANG
=
true
USE_IRRKLANG
=
true
elseif
(
_OPTIONS
[
"no-use-irrklang"
]
or
os.getenv
(
"NO_USE_IRRKLANG"
)
)
then
elseif
GetParam
(
"no-use-irrklang"
)
then
USE_IRRKLANG
=
false
USE_IRRKLANG
=
false
end
end
if
USE_IRRKLANG
then
if
USE_IRRKLANG
then
IRRKLANG_INCLUDE_DIR
=
_OPTIONS
[
"irrklang-include-dir"
]
or
"../irrklang/include"
IRRKLANG_INCLUDE_DIR
=
GetParam
(
"irrklang-include-dir"
)
or
"../irrklang/include"
if
os
.
istarget
(
"windows"
)
then
if
os
.
istarget
(
"windows"
)
then
IRRKLANG_LIB_DIR
=
"../irrklang/lib/Win32-visualStudio"
IRRKLANG_LIB_DIR
=
"../irrklang/lib/Win32-visualStudio"
elseif
os
.
istarget
(
"linux"
)
then
elseif
os
.
istarget
(
"linux"
)
then
...
@@ -117,24 +122,24 @@ if USE_IRRKLANG then
...
@@ -117,24 +122,24 @@ if USE_IRRKLANG then
elseif
os
.
istarget
(
"macosx"
)
then
elseif
os
.
istarget
(
"macosx"
)
then
IRRKLANG_LIB_DIR
=
"../irrklang/bin/macosx-gcc"
IRRKLANG_LIB_DIR
=
"../irrklang/bin/macosx-gcc"
end
end
IRRKLANG_LIB_DIR
=
_OPTIONS
[
"irrklang-lib-dir"
]
or
IRRKLANG_LIB_DIR
IRRKLANG_LIB_DIR
=
GetParam
(
"irrklang-lib-dir"
)
or
IRRKLANG_LIB_DIR
end
end
if
(
_OPTIONS
[
"irrklang-pro"
]
)
and
os
.
istarget
(
"windows"
)
then
if
GetParam
(
"irrklang-pro"
)
and
os
.
istarget
(
"windows"
)
then
IRRKLANG_PRO
=
true
IRRKLANG_PRO
=
true
elseif
(
_OPTIONS
[
"no-irrklang-pro"
]
)
then
elseif
GetParam
(
"no-irrklang-pro"
)
then
IRRKLANG_PRO
=
false
IRRKLANG_PRO
=
false
end
end
if
IRRKLANG_PRO
then
if
IRRKLANG_PRO
then
-- irrklang pro can't use the pro lib to debug
-- irrklang pro can't use the pro lib to debug
IRRKLANG_PRO_RELEASE_LIB_DIR
=
_OPTIONS
[
"irrklang-pro-release-lib-dir"
]
or
"../irrklang/lib/Win32-vs2019"
IRRKLANG_PRO_RELEASE_LIB_DIR
=
GetParam
(
"irrklang-pro-release-lib-dir"
)
or
"../irrklang/lib/Win32-vs2019"
IRRKLANG_PRO_DEBUG_LIB_DIR
=
_OPTIONS
[
"irrklang-pro-debug-lib-dir"
]
or
"../irrklang/lib/Win32-visualStudio-debug"
IRRKLANG_PRO_DEBUG_LIB_DIR
=
GetParam
(
"irrklang-pro-debug-lib-dir"
)
or
"../irrklang/lib/Win32-visualStudio-debug"
end
end
if
(
_OPTIONS
[
"winxp-support"
]
)
and
os
.
istarget
(
"windows"
)
then
if
GetParam
(
"winxp-support"
)
and
os
.
istarget
(
"windows"
)
then
WINXP_SUPPORT
=
true
WINXP_SUPPORT
=
true
end
end
if
(
_OPTIONS
[
"mac-arm"
]
or
os.getenv
(
"YGOPRO_TARGET_ARM"
)
)
and
os
.
istarget
(
"macosx"
)
then
if
(
GetParam
(
"mac-arm"
)
and
os
.
istarget
(
"macosx"
)
then
MAC_ARM
=
true
MAC_ARM
=
true
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment