Conversation
|
先只处理 client 的 midl 代码生成吧。 |
First, just process the midl code generation of client. |
|
tests下给个 example,顺带 changelog 也更新下 |
Give it an example under tests, and also update the changelog |
|
发现 idl 文件内容会决定生成哪几个文件,否则有些文件找不到,还得再研究一下。 |
If you find that the content of the idl file will determine which files to generate, otherwise some files will not be found, so you have to study it again. |
| on_config(function (target) | ||
| local autogendir = path.join(target:autogendir(), "platform/windows/idl") | ||
| os.mkdir(autogendir) | ||
| target:add("includedirs", autogendir, {public = true}) |
There was a problem hiding this comment.
rule 里生成的头文件,如果下游 target 想用怎么办,粗粒度一点应该也不会撞吧
There was a problem hiding this comment.
目前是所有工程 不管是否带 idl,都会带上这个 includedirs,即使没头文件冲突,但是 xmake -v 里莫名带上这个 includedirs 也很怪。
我稍微改了下,其实可以参考 windows.def 那个 rule,只有当前 target 带有 idl files ,才加上。
| rule("platform.windows.idl") | ||
| set_extensions(".idl") | ||
|
|
||
| on_config(function (target) |
close #5675