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
9aa82366
Commit
9aa82366
authored
Apr 13, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support env
parent
d6674c19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
32 deletions
+37
-32
premake5.lua
premake5.lua
+37
-32
No files found.
premake5.lua
View file @
9aa82366
-- default global settings
BUILD_LUA
=
true
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
...
...
@@ -8,7 +9,7 @@ USE_IRRKLANG = true
IRRKLANG_PRO
=
false
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
=
""
}
...
...
@@ -49,66 +50,70 @@ newoption { trigger = "irrklang-pro-debug-lib-dir", category = "YGOPro - irrklan
newoption
{
trigger
=
"winxp-support"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"mac-arm"
,
category
=
"YGOPro"
,
description
=
"M1"
}
if
(
_OPTIONS
[
"build-lua"
])
then
function
GetParam
(
param
)
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
end
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
elseif
(
_OPTIONS
[
"no-build-lua"
]
)
then
elseif
GetParam
(
"no-build-lua"
)
then
BUILD_LUA
=
false
end
if
not
BUILD_LUA
then
-- 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
LUA_INCLUDE_DIR
=
_OPTIONS
[
"lua-include-dir"
]
or
"/usr/local/include/lua"
LUA_LIB_DIR
=
_OPTIONS
[
"lua-lib-dir"
]
or
"/usr/local/lib"
LUA_LIB_NAME
=
_OPTIONS
[
"lua-lib-name"
]
LUA_INCLUDE_DIR
=
GetParam
(
"lua-include-dir"
)
or
"/usr/local/include/lua"
LUA_LIB_DIR
=
GetParam
(
"lua-lib-dir"
)
or
"/usr/local/lib"
LUA_LIB_NAME
=
GetParam
(
"lua-lib-name"
)
end
if
(
_OPTIONS
[
"build-event"
]
)
then
if
GetParam
(
"build-event"
)
then
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
end
if
not
BUILD_EVENT
then
EVENT_INCLUDE_DIR
=
_OPTIONS
[
"event-include-dir"
]
or
"/usr/local/include/event2"
EVENT_LIB_DIR
=
_OPTIONS
[
"event-lib-dir"
]
or
"/usr/local/lib"
EVENT_INCLUDE_DIR
=
GetParam
(
"event-include-dir"
)
or
"/usr/local/include/event2"
EVENT_LIB_DIR
=
GetParam
(
"event-lib-dir"
)
or
"/usr/local/lib"
end
if
(
_OPTIONS
[
"build-freetype"
]
)
then
if
GetParam
(
"build-freetype"
)
then
BUILD_FREETYPE
=
true
elseif
(
_OPTIONS
[
"no-build-freetype"
]
)
then
elseif
GetParam
(
"no-build-freetype"
)
then
BUILD_FREETYPE
=
false
end
if
not
BUILD_FREETYPE
then
FREETYPE_INCLUDE_DIR
=
_OPTIONS
[
"freetype-include-dir"
]
or
"/usr/local/include/freetype2"
FREETYPE_LIB_DIR
=
_OPTIONS
[
"freetype-lib-dir"
]
or
"/usr/local/lib"
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
"/usr/local/include/freetype2"
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
"/usr/local/lib"
end
if
(
_OPTIONS
[
"build-sqlite"
]
)
then
if
GetParam
(
"build-sqlite"
)
then
BUILD_SQLITE
=
true
elseif
(
_OPTIONS
[
"no-build-sqlite"
]
)
then
elseif
GetParam
(
"no-build-sqlite"
)
then
BUILD_SQLITE
=
false
end
if
not
BUILD_SQLITE
then
SQLITE_INCLUDE_DIR
=
_OPTIONS
[
"sqlite-include-dir"
]
or
"/usr/local/include"
SQLITE_LIB_DIR
=
_OPTIONS
[
"sqlite-lib-dir"
]
or
"/usr/local/lib"
SQLITE_INCLUDE_DIR
=
GetParam
(
"sqlite-include-dir"
)
or
"/usr/local/include"
SQLITE_LIB_DIR
=
GetParam
(
"sqlite-lib-dir"
)
or
"/usr/local/lib"
end
if
(
_OPTIONS
[
"build-irrlicht"
]
)
then
if
GetParam
(
"build-irrlicht"
)
then
BUILD_IRRLICHT
=
true
elseif
(
_OPTIONS
[
"no-build-irrlicht"
]
)
then
elseif
GetParam
(
"no-build-irrlicht"
)
then
BUILD_IRRLICHT
=
false
end
if
not
BUILD_IRRLICHT
then
IRRLICHT_INCLUDE_DIR
=
_OPTIONS
[
"irrlicht-include-dir"
]
or
"/usr/local/include/irrlicht"
IRRLICHT_LIB_DIR
=
_OPTIONS
[
"irrlicht-lib-dir"
]
or
"/usr/local/lib"
IRRLICHT_INCLUDE_DIR
=
GetParam
(
"irrlicht-include-dir"
)
or
"/usr/local/include/irrlicht"
IRRLICHT_LIB_DIR
=
GetParam
(
"irrlicht-lib-dir"
)
or
"/usr/local/lib"
end
if
(
_OPTIONS
[
"use-irrklang"
]
)
then
if
GetParam
(
"use-irrklang"
)
then
USE_IRRKLANG
=
true
elseif
(
_OPTIONS
[
"no-use-irrklang"
]
)
then
elseif
GetParam
(
"no-use-irrklang"
)
then
USE_IRRKLANG
=
false
end
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
IRRKLANG_LIB_DIR
=
"../irrklang/lib/Win32-visualStudio"
elseif
os
.
istarget
(
"linux"
)
then
...
...
@@ -117,24 +122,24 @@ if USE_IRRKLANG then
elseif
os
.
istarget
(
"macosx"
)
then
IRRKLANG_LIB_DIR
=
"../irrklang/bin/macosx-gcc"
end
IRRKLANG_LIB_DIR
=
_OPTIONS
[
"irrklang-lib-dir"
]
or
IRRKLANG_LIB_DIR
IRRKLANG_LIB_DIR
=
GetParam
(
"irrklang-lib-dir"
)
or
IRRKLANG_LIB_DIR
end
if
(
_OPTIONS
[
"irrklang-pro"
]
)
and
os
.
istarget
(
"windows"
)
then
if
GetParam
(
"irrklang-pro"
)
and
os
.
istarget
(
"windows"
)
then
IRRKLANG_PRO
=
true
elseif
(
_OPTIONS
[
"no-irrklang-pro"
]
)
then
elseif
GetParam
(
"no-irrklang-pro"
)
then
IRRKLANG_PRO
=
false
end
if
IRRKLANG_PRO
then
-- 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_DEBUG_LIB_DIR
=
_OPTIONS
[
"irrklang-pro-debug-lib-dir"
]
or
"../irrklang/lib/Win32-visualStudio-debug"
IRRKLANG_PRO_RELEASE_LIB_DIR
=
GetParam
(
"irrklang-pro-release-lib-dir"
)
or
"../irrklang/lib/Win32-vs2019"
IRRKLANG_PRO_DEBUG_LIB_DIR
=
GetParam
(
"irrklang-pro-debug-lib-dir"
)
or
"../irrklang/lib/Win32-visualStudio-debug"
end
if
(
_OPTIONS
[
"winxp-support"
]
)
and
os
.
istarget
(
"windows"
)
then
if
GetParam
(
"winxp-support"
)
and
os
.
istarget
(
"windows"
)
then
WINXP_SUPPORT
=
true
end
if
(
_OPTIONS
[
"mac-arm"
]
)
and
os
.
istarget
(
"macosx"
)
then
if
(
GetParam
(
"mac-arm"
)
and
os
.
istarget
(
"macosx"
)
then
MAC_ARM
=
true
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