diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-01 16:43:55 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-01 16:43:55 +0100 |
commit | 29a4aa114462e569281e8f821cb67506f629c5e8 (patch) | |
tree | 1e633680b56e03f26bd0bf1cea1d28a6b4e5a93b /src/main/java | |
parent | f91d47a1927b0256f352078cc3275f90699be829 (diff) | |
download | maven-nar-plugin-29a4aa114462e569281e8f821cb67506f629c5e8.tar.gz maven-nar-plugin-29a4aa114462e569281e8f821cb67506f629c5e8.tar.bz2 maven-nar-plugin-29a4aa114462e569281e8f821cb67506f629c5e8.tar.xz maven-nar-plugin-29a4aa114462e569281e8f821cb67506f629c5e8.zip |
Fixed NAR-26
Diffstat (limited to 'src/main/java')
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 ); |