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
YGOPRO-520DIY
ygopro
Commits
67e226ef
Commit
67e226ef
authored
May 21, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add premake FindHeaderWithSubDir
parent
f9b5c7ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
premake5.lua
premake5.lua
+11
-3
No files found.
premake5.lua
View file @
67e226ef
...
@@ -77,6 +77,14 @@ function GetParam(param)
...
@@ -77,6 +77,14 @@ function GetParam(param)
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
end
end
function
FindHeaderWithSubDir
(
header
,
subdir
)
local
result
=
os
.
findheader
(
header
)
if
result
and
subdir
then
result
=
path
.
join
(
result
,
subdir
)
end
return
result
end
if
GetParam
(
"build-lua"
)
then
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
BUILD_LUA
=
true
elseif
GetParam
(
"no-build-lua"
)
then
elseif
GetParam
(
"no-build-lua"
)
then
...
@@ -106,7 +114,7 @@ elseif GetParam("no-build-freetype") then
...
@@ -106,7 +114,7 @@ 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
=
GetParam
(
"freetype-include-dir"
)
or
os
.
findheader
(
"freetype2/ft2build.h"
)
..
"/freetype2"
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
FindHeaderWithSubDir
(
"freetype2/ft2build.h"
,
"freetype2"
)
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
os
.
findlib
(
"freetype"
)
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
os
.
findlib
(
"freetype"
)
end
end
...
@@ -163,9 +171,9 @@ if USE_AUDIO then
...
@@ -163,9 +171,9 @@ if USE_AUDIO then
MINIAUDIO_BUILD_OPUS_VORBIS
=
true
MINIAUDIO_BUILD_OPUS_VORBIS
=
true
end
end
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
os
.
findheader
(
"opus/opus.h"
)
..
"/opus"
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opus.h"
,
"opus"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opus"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opus"
)
OPUSFILE_INCLUDE_DIR
=
GetParam
(
"opusfile-include-dir"
)
or
os
.
findheader
(
"opus/opusfile.h"
)
..
"/opus"
OPUSFILE_INCLUDE_DIR
=
GetParam
(
"opusfile-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opusfile.h"
,
"opus"
)
OPUSFILE_LIB_DIR
=
GetParam
(
"opusfile-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
OPUSFILE_LIB_DIR
=
GetParam
(
"opusfile-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis/vorbisfile.h"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis/vorbisfile.h"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
...
...
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