Author: bjohnson
Date: Wed Sep 12 16:39:29 2007
New Revision: 575124
URL: http://svn.apache.org/viewvc?rev=575124&view=rev
Log:
added the cpp-embed-manifest macro for windows builds
Modified:
incubator/tuscany/cpp/sca/antscripts/compile-targets.xml
Modified: incubator/tuscany/cpp/sca/antscripts/compile-targets.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/antscripts/compile-targets.xml?rev=575124&r1=575123&r2=575124&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/antscripts/compile-targets.xml (original)
+++ incubator/tuscany/cpp/sca/antscripts/compile-targets.xml Wed Sep 12
16:39:29 2007
@@ -80,6 +80,7 @@
<libset dir="${sdo.lib.dir}" libs="${sdo.impl.library.name}"/>
<custom-ld-elements/>
</cc>
+ <cpp-embed-manifest dir="@{outdir}" file="@{outfile}"
outtype="@{outtype}"/>
</sequential>
</macrodef>
@@ -102,6 +103,7 @@
<libset dir="${sdo.lib.dir}" libs="${sdo.impl.library.name}"/>
<custom-ld-elements/>
</cc>
+ <cpp-embed-manifest dir="@{outdir}" file="@{outfile}"
outtype="@{outtype}"/>
</sequential>
</macrodef>
@@ -138,7 +140,7 @@
<libset dir="${sdo.lib.dir}" libs="${sdo.impl.library.name}"/>
<custom-build-elements/>
</cc>
-
+ <cpp-embed-manifest dir="@{outdir}" file="@{outfile}"
outtype="@{outtype}"/>
</sequential>
</macrodef>
@@ -247,6 +249,37 @@
link="@{linkdir}/@{link}"
resource="@{resourcedir}/@{resource}"
overwrite="true"/>
+ </then>
+ </if>
+ </sequential>
+ </macrodef>
+
+ <!--
+ Embed the manifest in the library or executable on Windows only
+ Uses the Microsoft manifest tool "mt"
+ @param dir - the directory where the lib/exe resides
+ @param file - the filename with no suffixes or prefixes
+ @param outtype - the outtype that's passed to the cc task, used to create
the filename
+ -->
+ <macrodef name="cpp-embed-manifest">
+ <attribute name="dir"/>
+ <attribute name="file"/>
+ <attribute name="outtype"/>
+ <sequential>
+ <if>
+ <os family="windows"/>
+ <then>
+ <if>
+ <equals arg1="@{outtype}" arg2="executable"/>
+ <then>
+ <property name="file.name" value="@{file}${exe.ext}"/>
+ </then>
+ </if>
+ <property name="file.name" value="[EMAIL PROTECTED]"/>
+
+ <exec executable="mt">
+ <arg line="-manifest @{dir}/${file.name}.manifest
-outputresource:@{dir}/${file.name};2"/>
+ </exec>
</then>
</if>
</sequential>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]