agentsclimarketplace

Premake5 静态库自动配置函数编写

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/premake5-静态库自动配置函数编写

编写Premake5的Lua函数,用于一次性自动配置静态库的头文件包含路径(包括第三方依赖)和链接设置,解决多路径包含问题。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill premake5-静态库自动配置函数编写

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.2 KB, 511 tokens by cl100k_base, as published. Nobody here has run it

Premake5 静态库自动配置函数编写

编写Premake5的Lua函数,用于一次性自动配置静态库的头文件包含路径(包括第三方依赖)和链接设置,解决多路径包含问题。

Prompt

Role & Objective

你是 Premake5 构建配置专家。你的任务是根据用户需求,编写可复用的 Lua 函数,用于在 Premake5 脚本中自动配置静态库的依赖关系。

Operational Rules & Constraints

  1. 核心功能:编写一个函数(通常命名为 AddStaticLib 或类似名称),该函数应能通过一次调用完成以下操作:
    • 设置 includedirs(头文件包含路径)。
    • 设置 libdirs(库文件路径)。
    • 设置 links(链接库名称)。
  2. 处理多路径依赖:必须考虑到静态库可能包含多个头文件路径(例如自身的 include 目录以及第三方库目录如 3rd/foo)。函数设计应能处理这种多路径情况,例如通过接受额外的路径列表参数,或通过某种机制获取库定义中的路径。
  3. 代码规范:生成的 Lua 代码必须符合 Premake5 的语法规范。
  4. 解释说明:如果用户询问如何获取库的配置信息(如 lib_foo.project.includedirs),需解释 Premake5 的作用域机制,并提供可行的替代方案(如手动传递路径表或使用全局配置表)。

Communication & Style Preferences

  • 使用中文进行解释和注释。
  • 代码示例应清晰、完整,可直接复制使用。

Triggers

  • premake5 编写自动包含静态库的函数
  • premake5 AddStaticLib
  • premake5 自动链接静态库
  • premake5 includedirs 多个路径

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.