File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
src/main/java/io/github/coffeelibs/maven/jextract Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ This is a Maven wrapper for the [`jextract`](https://github.com/openjdk/jextract
2121 </goals >
2222 <configuration >
2323 <headerFile >point.h</headerFile >
24+ <libraries >
25+ <library >/path/to/shared/library.so</library >
26+ </libraries >
2427 <targetPackage >com.example.mypackage</targetPackage >
2528 <headerClassName >Point2d</headerClassName >
2629 <includeStructs >
Original file line number Diff line number Diff line change 44 <groupId >io.github.coffeelibs</groupId >
55 <artifactId >jextract-maven-plugin</artifactId >
66 <packaging >maven-plugin</packaging >
7- <version >0.4.0 </version >
7+ <version >0.4.1 </version >
88 <name >jextract Maven Plugin</name >
99 <description >A Maven plugin to invokes jextract.</description >
1010 <inceptionYear >2022</inceptionYear >
Original file line number Diff line number Diff line change @@ -127,6 +127,15 @@ public class SourcesMojo extends AbstractMojo {
127127 @ Parameter (property = "jextract.includeVars" , required = false )
128128 private String [] includeVars ;
129129
130+ /**
131+ * <dl>
132+ * <dt>--library</dt>
133+ * <dd>path to shared libraries to load</dd>
134+ * </dl>
135+ */
136+ @ Parameter (property = "jextract.libraries" , required = false )
137+ private String [] libraries ;
138+
130139 /**
131140 * <dl>
132141 * <dt>--output</dt>
@@ -161,6 +170,10 @@ public void execute() throws MojoFailureException {
161170 args .add (outputDirectory .getAbsolutePath ());
162171 args .add ("--target-package" );
163172 args .add (targetPackage );
173+ Arrays .stream (libraries ).forEach (str -> {
174+ args .add ("--library" );
175+ args .add (str );
176+ });
164177 Arrays .stream (headerSearchPaths ).forEach (str -> {
165178 args .add ("-I" );
166179 args .add (str );
You can’t perform that action at this time.
0 commit comments