]> git.saurik.com Git - wxWidgets.git/blobdiff - build/bakefiles/wxpresets/presets/wx_win32.bkl
fix GCC warning
[wxWidgets.git] / build / bakefiles / wxpresets / presets / wx_win32.bkl
index 0c015e75cf6cf8d85ad8c30670286dec47ce7c25..4b86018beeb66e6d98081e71b4a748250187c95a 100644 (file)
             </description>
         </option>
     </if>
+    <if cond="not isdefined('TARGET_CPU') and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1'">
+        <!-- defining TARGET_CPU also for the formats using the MSVS_PLATFORM variable allows to write
+             easier tests in user bakefiles; e.g.:
+             
+            <set var="MY_ARCH_DEPENDENT_VARIABLE">
+                <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='0'">value1</if>
+                <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='X86'">value2</if>
+                <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">value3</if>
+                <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">value4</if>
+            </set>
+        -->
+        <set var="TARGET_CPU">
+            <if cond="MSVS_PLATFORM=='win32'">X86</if>
+            <if cond="MSVS_PLATFORM=='win64'">AMD64</if>
+            <if cond="MSVS_PLATFORM=='ia64'">IA64</if>
+                <!-- MSVS_PLATFORM currently does not support ia64 but this line is still needed by bakefile 
+                     to correctly set the TARGET_CPU variable -->
+        </set>
+    </if>
 
 
 
 
     <set var="WXCPU">
         <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
-        
-        <!-- just define the correct string for those formats which support the 'TARGET_CPU' option: -->
-        <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='AMD64'">_amd64</if>
-        <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='IA64'">_ia64</if>
-        
-        <!-- for MSVS projects instead of the 'TARGET_CPU' option we need to use the 'MSVS_PLATFORM' variable: -->
-        <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1' and MSVS_PLATFORM=='win64'">_amd64</if>
+        <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">_amd64</if>
+        <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">_ia64</if>
     </set>
     
     <set var="WXMACHINE_FLAG">
-        <!-- add the /MACHINE linker flag to formats with "normal" multiple-arch support when building in 64bit mode: -->
+        <!-- add the /MACHINE linker flag to formats with "normal" multiple-arch support when building in 64bit mode
+             (formats using the MSVS_PLATFORM variable don't need the /MACHINE linker flag!): -->
         <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='AMD64'">/MACHINE:AMD64</if>
         <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='IA64'">/MACHINE:IA64</if>
     </set>