summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/Library.java14
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java6
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java6
3 files changed, 25 insertions, 1 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/Library.java b/src/main/java/org/apache/maven/plugin/nar/Library.java
index 3f5588a..f819a65 100644
--- a/src/main/java/org/apache/maven/plugin/nar/Library.java
+++ b/src/main/java/org/apache/maven/plugin/nar/Library.java
@@ -50,7 +50,14 @@ public class Library
* @parameter expression=""
*/
private String type = SHARED;
-
+
+ /**
+ * Type of subsystem to generate: "gui", "console", "other". Defaults to "console".
+ *
+ * @parameter expression=""
+ */
+ private String subSystem = "console";
+
/**
* Link with stdcpp if necessary Defaults to true.
*
@@ -163,4 +170,9 @@ public class Library
sb.append( getType() );
return sb.toString();
}
+
+ public String getSubSystem()
+ {
+ return subSystem;
+ }
}
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
index f773211..47f6dd4 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
@@ -33,6 +33,7 @@ import net.sf.antcontrib.cpptasks.CompilerDef;
import net.sf.antcontrib.cpptasks.LinkerDef;
import net.sf.antcontrib.cpptasks.OutputTypeEnum;
import net.sf.antcontrib.cpptasks.RuntimeType;
+import net.sf.antcontrib.cpptasks.SubsystemEnum;
import net.sf.antcontrib.cpptasks.types.LibrarySet;
import net.sf.antcontrib.cpptasks.types.LinkerArgument;
import net.sf.antcontrib.cpptasks.types.SystemLibrarySet;
@@ -121,6 +122,11 @@ public class NarCompileMojo
// configure task
CCTask task = new CCTask();
task.setProject( antProject );
+
+ // subsystem
+ SubsystemEnum subSystem = new SubsystemEnum();
+ subSystem.setValue( library.getSubSystem() );
+ task.setSubsystem( subSystem );
// set max cores
task.setMaxCores( getMaxCores( getAOL() ) );
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java
index 70fcd8b..d59cc0a 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java
@@ -29,6 +29,7 @@ import net.sf.antcontrib.cpptasks.CUtil;
import net.sf.antcontrib.cpptasks.CompilerDef;
import net.sf.antcontrib.cpptasks.OutputTypeEnum;
import net.sf.antcontrib.cpptasks.RuntimeType;
+import net.sf.antcontrib.cpptasks.SubsystemEnum;
import net.sf.antcontrib.cpptasks.types.LibrarySet;
import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
@@ -77,6 +78,11 @@ public class NarTestCompileMojo
CCTask task = new CCTask();
task.setProject( antProject );
+ // subsystem
+ SubsystemEnum subSystem = new SubsystemEnum();
+ subSystem.setValue( "console" );
+ task.setSubsystem( subSystem );
+
// outtype
OutputTypeEnum outTypeEnum = new OutputTypeEnum();
outTypeEnum.setValue( Library.EXECUTABLE );