You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bj...@apache.org on 2007/09/13 01:44:21 UTC
svn commit: r575125 -
/incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml
Author: bjohnson
Date: Wed Sep 12 16:44:20 2007
New Revision: 575125
URL: http://svn.apache.org/viewvc?rev=575125&view=rev
Log:
added the cpp-embed-manifest macro for windows builds
Modified:
incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml
Modified: incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml?rev=575125&r1=575124&r2=575125&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml (original)
+++ incubator/tuscany/cpp/sdo/antscripts/compile-targets.xml Wed Sep 12 16:44:20 2007
@@ -75,6 +75,7 @@
<fileset dir='@{indir}' includes='@{infiles}'/>
<custom-ld-elements/>
</cc>
+ <cpp-embed-manifest dir="@{outdir}" file="@{outfile}" outtype="@{outtype}"/>
</sequential>
</macrodef>
@@ -109,6 +110,7 @@
<fileset dir='@{srcdir}' includes='@{infiles}'/>
<custom-build-elements/>
</cc>
+ <cpp-embed-manifest dir="@{outdir}" file="@{outfile}" outtype="@{outtype}"/>
</sequential>
</macrodef>
@@ -217,6 +219,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="${lib.prefix}@{file}${dll.ext}"/>
+
+ <exec executable="mt">
+ <arg line="-manifest @{dir}/${file.name}.manifest -outputresource:@{dir}/${file.name};2"/>
+ </exec>
</then>
</if>
</sequential>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org