You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/package-management/distribute-private-libraries.md
+16-19Lines changed: 16 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,38 +265,35 @@ Xmake will automatically pull the package description from the `my-repo` reposit
265
265
266
266
## Distribute C++ Modules Package {#distribute-cxx-modules}
267
267
268
-
Xmake also supports distributing C++ Modules libraries. We only need to add `{install = true}` in `add_files` to package and distribute module files (`.mpp`, `.ixx`, etc.) together.
268
+
Xmake also supports distributing C++ Modules libraries.
269
269
270
-
Usually, we need to define the package in an independent repository.
In the private package repository (e.g., `my-repo`), add the package description file `packages/f/foo/xmake.lua`:
282
+
In the package description, we need to set `set_kind("library", {moduleonly = true})`. This tells Xmake to treat it as a pure module package, which does not require conventional library linking and handles module dependencies better.
For more complete examples, please refer to: [C++ Modules Package Distribution Example](https://github.com/xmake-io/xmake/tree/master/tests/projects/c%2B%2B/modules/packages).
0 commit comments