We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rule("protobuf.cpp") add the _gens/** folder to the target's include directories.
However there is no easy way of declaring the _gens/** directory as a public include directory.
This is required for libraries with protobuf files in them.
It would be great if there was an option in the rule to export the include directory.
The text was updated successfully, but these errors were encountered:
you can update to dev, xmake update -s dev
xmake update -s dev
and try {proto_public = true}
{proto_public = true}
add_files("src/**.proto", {rules = "protobuf.c", proto_public = true})
Sorry, something went wrong.
Does it work?
Yes, I can confirm it compiles now.
One small issue though. Protobuf include path does not appear in the compile_commands.json generated by vscode. Is that something easy to fix?
{ "directory": "/Users/ruki/projects/personal/xmake/tests/projects/c/protobuf", "arguments": ["/usr/local/bin/ccache", "/usr/bin/xcrun", "-sdk", "macosx", "clang", "-c", "-Qun used-arguments", "-arch", "x86_64", "-mmacosx-version-min=10.15", "-isysroot", "/Applications/Xco de.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", "-fvisibilit y=hidden", "-O3", "-Ibuild/.gens/test/macosx/x86_64/release/rules/protobuf/src", "-I", "/Users/ru ki/.xmake/packages/p/protobuf-c/1.3.1/f025d1e2f6944ee8a7b62ad011126f67/include", "-I", "/Users/ru ki/.xmake/packages/p/protobuf-cpp/3.15.5/6c4662c08c5f4cee8a4a04ec43f24434/include", "-DNDEBUG", " -o", "build/.objs/test/macosx/x86_64/release/src/main.c.o", "src/main.c"], "file": "src/main.c" }]
It works for me.
"-Ibuild/.gens/test/macosx/x86_64/release/rules/protobuf/src",
No branches or pull requests
rule("protobuf.cpp") add the _gens/** folder to the target's include directories.
However there is no easy way of declaring the _gens/** directory as a public include directory.
This is required for libraries with protobuf files in them.
It would be great if there was an option in the rule to export the include directory.
The text was updated successfully, but these errors were encountered: