Skip to content

add premake FindHeaderWithSubDir#2803

Merged
purerosefallen merged 1 commit intoFluorohydride:masterfrom
mercury233:patch-premake-nil
May 21, 2025
Merged

add premake FindHeaderWithSubDir#2803
purerosefallen merged 1 commit intoFluorohydride:masterfrom
mercury233:patch-premake-nil

Conversation

@mercury233
Copy link
Copy Markdown
Collaborator

Problem:
Some dependency header file paths are located in subfolders, while the relevant code directly uses the file name. For example:
In miniaudio_libopus.c, #include <opusfile.h> refers to the file located at /usr/include/opus/opusfile.h.
Therefore, we need to provide the full /usr/include/opus path.

Currently, Premake5 does not support searching in subfolders. Using os.findheader("opus/opusfile.h") returns /usr/include, so we have to manually append opus afterward.

However, the current code throws an "attempt to concatenate a nil value" error when os.findheader returns nil.

Solution:
Add an additional wrapper, or wait until premake/premake-core#2469 gets merged.

path.join is a function provided by Premake.

@purerosefallen purerosefallen merged commit 56d6022 into Fluorohydride:master May 21, 2025
8 checks passed
@mercury233 mercury233 deleted the patch-premake-nil branch May 21, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants