[json-glib] Update Visual Studio Property Sheets



commit 3350c6ee0767fa18ab3ccd7c699ba5a397418573
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Mar 7 17:21:04 2013 +0800

    Update Visual Studio Property Sheets
    
    -Replace JsonGlibVersion with ApiVersion, to be consistent with the Visual
     Studio property sheets of the other parts of the GTK+/Clutter stack, and
     update the corresponding projects
    -Add directives in the property sheets so that we use later to build the
     introspection files

 build/win32/vs10/json-glib.props     |   69 ++++++++++++++++++++++------------
 build/win32/vs10/json-glib.vcxprojin |    8 ++--
 build/win32/vs9/json-glib.vcprojin   |    8 ++--
 build/win32/vs9/json-glib.vsprops    |   59 +++++++++++++++++++---------
 4 files changed, 93 insertions(+), 51 deletions(-)
---
diff --git a/build/win32/vs10/json-glib.props b/build/win32/vs10/json-glib.props
index 3c0b2a1..1efcc9f 100644
--- a/build/win32/vs10/json-glib.props
+++ b/build/win32/vs10/json-glib.props
@@ -1,10 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
   <PropertyGroup Label="UserMacros">
-    <GlibEtcInstallRoot>..\..\..\..\vs10\$(Platform)</GlibEtcInstallRoot>
+    <VSVer>10</VSVer>
+    <GlibEtcInstallRoot>..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
+    <GlibEtcInstallRootFromBuildWin32>..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRootFromBuildWin32>
     <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
     <DefDir>$(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\</DefDir>
-    <JsonGlibVersion>1.0</JsonGlibVersion>
+    <ApiVersion>1.0</ApiVersion>
     <PrepBuild>
 if exist ..\..\..\config.h goto DONE_CONFIG_H
 
@@ -31,33 +33,43 @@ copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
 copy ..\..\..\json-glib\tests\stream-load.json $(CopyDir)\bin
 
 
-mkdir $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+mkdir $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
 
-copy ..\..\..\json-glib\json-enum-types.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-enum-types.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-version.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-version.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-glib.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-glib.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
 
-copy ..\..\..\json-glib\json-builder.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-builder.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-generator.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-generator.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-gvariant.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-gvariant.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-gobject.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-gobject.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-path.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-path.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-parser.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-parser.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-reader.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-reader.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
-copy ..\..\..\json-glib\json-types.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib
+copy ..\..\..\json-glib\json-types.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
 
 </JsonGlibDoInstall>
+<DoGenGir>
+set VSVER=$(VSVer)
+set CONF=$(Configuration)
+set PLAT=$(Platform)
+set BASEDIR=$(GlibEtcInstallRootFromBuildWin32)
+cd ..
+call gengir_jsonglib.bat
+
+cd vs$(VSVer)
+</DoGenGir>
     <JsonGlibGenerateDef>
 echo EXPORTS &gt;$(DefDir)\json-glib.def
 cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
@@ -65,10 +77,10 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
     <JsonGlibDefines>JSON_COMPILATION;G_LOG_DOMAIN="Json"</JsonGlibDefines>
     <JsonGlibLibtoolCompatibleDllPrefix>lib</JsonGlibLibtoolCompatibleDllPrefix>
     <JsonGlibLibtoolCompatibleDllSuffix>-1.0-0</JsonGlibLibtoolCompatibleDllSuffix>
-    <JsonGlibSeparateVS10DllPrefix />
-    <JsonGlibSeparateVS10DllSuffix>-1-vs10</JsonGlibSeparateVS10DllSuffix>
-    <JsonGlibDllPrefix>$(JsonGlibSeparateVS10DllPrefix)</JsonGlibDllPrefix>
-    <JsonGlibDllSuffix>$(JsonGlibSeparateVS10DllSuffix)</JsonGlibDllSuffix>
+    <JsonGlibSeparateVSDllPrefix />
+    <JsonGlibSeparateVSDllSuffix>-1-vs$(VSVer)</JsonGlibSeparateVSDllSuffix>
+    <JsonGlibDllPrefix>$(JsonGlibSeparateVSDllPrefix)</JsonGlibDllPrefix>
+    <JsonGlibDllSuffix>$(JsonGlibSeparateVSDllSuffix)</JsonGlibDllSuffix>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>jsonglibprops</_PropertySheetDisplayName>
@@ -87,9 +99,15 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <BuildMacro Include="VSVer">
+      <Value>$(VSVer)</Value>
+    </BuildMacro>
     <BuildMacro Include="GlibEtcInstallRoot">
       <Value>$(GlibEtcInstallRoot)</Value>
     </BuildMacro>
+    <BuildMacro Include="GlibEtcInstallRootFromBuildWin32">
+      <Value>$(GlibEtcInstallRootFromBuildWin32)</Value>
+    </BuildMacro>
     <BuildMacro Include="CopyDir">
       <Value>$(CopyDir)</Value>
     </BuildMacro>
@@ -102,8 +120,8 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
     <BuildMacro Include="JsonGlibGenerateDef">
       <Value>$(JsonGlibGenerateDef)</Value>
     </BuildMacro>
-    <BuildMacro Include="JsonGlibVersion">
-      <Value>$(JsonGlibVersion)</Value>
+    <BuildMacro Include="ApiVersion">
+      <Value>$(ApiVersion)</Value>
     </BuildMacro>
     <BuildMacro Include="JsonGlibDefines">
       <Value>$(JsonGlibDefines)</Value>
@@ -114,11 +132,11 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
     <BuildMacro Include="JsonGlibLibtoolCompatibleDllSuffix">
       <Value>$(JsonGlibLibtoolCompatibleDllSuffix)</Value>
     </BuildMacro>
-    <BuildMacro Include="JsonGlibSeparateVS10DllPrefix">
-      <Value>$(JsonGlibSeparateVS10DllPrefix)</Value>
+    <BuildMacro Include="JsonGlibSeparateVSDllPrefix">
+      <Value>$(JsonGlibSeparateVSDllPrefix)</Value>
     </BuildMacro>
-    <BuildMacro Include="JsonGlibSeparateVS10DllSuffix">
-      <Value>$(JsonGlibSeparateVS10DllSuffix)</Value>
+    <BuildMacro Include="JsonGlibSeparateVSDllSuffix">
+      <Value>$(JsonGlibSeparateVSDllSuffix)</Value>
     </BuildMacro>
     <BuildMacro Include="JsonGlibDllPrefix">
       <Value>$(JsonGlibDllPrefix)</Value>
@@ -129,5 +147,8 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def
     <BuildMacro Include="DefDir">
       <Value>$(DefDir)</Value>
     </BuildMacro>
+    <BuildMacro Include="DoGenGir">
+      <Value>$(DoGenGir)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/build/win32/vs10/json-glib.vcxprojin b/build/win32/vs10/json-glib.vcxprojin
index cefa0ef..c5e7c71 100644
--- a/build/win32/vs10/json-glib.vcxprojin
+++ b/build/win32/vs10/json-glib.vcxprojin
@@ -92,7 +92,7 @@
       <ModuleDefinitionFile>$(IntDir)\json-glib.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <ImportLibrary>$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib</ImportLibrary>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
       <TargetMachine>MachineX86</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
@@ -120,7 +120,7 @@
       <ModuleDefinitionFile>$(IntDir)\json-glib.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <ImportLibrary>$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib</ImportLibrary>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
       <TargetMachine>MachineX64</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
@@ -151,7 +151,7 @@
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <ImportLibrary>$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib</ImportLibrary>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
       <TargetMachine>MachineX86</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
@@ -178,7 +178,7 @@
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <ImportLibrary>$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib</ImportLibrary>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
       <TargetMachine>MachineX64</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
diff --git a/build/win32/vs9/json-glib.vcprojin b/build/win32/vs9/json-glib.vcprojin
index ea648e5..2ab1537 100644
--- a/build/win32/vs9/json-glib.vcprojin
+++ b/build/win32/vs9/json-glib.vcprojin
@@ -53,7 +53,7 @@
                                ModuleDefinitionFile="$(IntDir)\json-glib.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
-                               ImportLibrary="$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
                                TargetMachine="1"
                        />
                </Configuration>
@@ -90,7 +90,7 @@
                                ModuleDefinitionFile="$(IntDir)\json-glib.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
-                               ImportLibrary="$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
                                TargetMachine="17"
                        />
                </Configuration>
@@ -131,7 +131,7 @@
                                SubSystem="2"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               ImportLibrary="$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
                                TargetMachine="1"
                        />
                </Configuration>
@@ -167,7 +167,7 @@
                                SubSystem="2"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               ImportLibrary="$(TargetDir)$(ProjectName)-$(JsonGlibVersion).lib"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
                                TargetMachine="17"
                        />
                </Configuration>
diff --git a/build/win32/vs9/json-glib.vsprops b/build/win32/vs9/json-glib.vsprops
index 0012c21..355c682 100644
--- a/build/win32/vs9/json-glib.vsprops
+++ b/build/win32/vs9/json-glib.vsprops
@@ -18,8 +18,16 @@
                AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
        />
        <UserMacro
+               Name="VSVer"
+               Value="9"
+       />
+       <UserMacro
                Name="GlibEtcInstallRoot"
-               Value="..\..\..\..\vs9\$(PlatformName)"
+               Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
+       />
+       <UserMacro
+               Name="GlibEtcInstallRootFromBuildWin32"
+               Value="..\..\..\vs$(VSVer)\$(PlatformName)"
        />
        <UserMacro
                Name="CopyDir"
@@ -38,7 +46,7 @@ copy ..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
 "
        />
        <UserMacro
-               Name="JsonGlibVersion"
+               Name="ApiVersion"
                Value="1.0"
        />
        <UserMacro
@@ -54,23 +62,36 @@ copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin
 copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin&#x0D;&#x0A;
 copy ..\..\..\json-glib\tests\stream-load.json $(CopyDir)\bin&#x0D;&#x0A;
 
-mkdir $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
+mkdir $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
 
-copy ..\..\..\json-glib\json-enum-types.h 
$(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-version.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-glib.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-enum-types.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-version.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-glib.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
 
-copy ..\..\..\json-glib\json-builder.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-generator.h 
$(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-gobject.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-gvariant.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-path.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-parser.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-reader.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
-copy ..\..\..\json-glib\json-types.h $(CopyDir)\include\json-glib-$(JsonGlibVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-builder.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-generator.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-gobject.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-gvariant.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-path.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-parser.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-reader.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
+copy ..\..\..\json-glib\json-types.h $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib&#x0D;&#x0A;
 "
        />
        <UserMacro
+               Name="DoGenGir"
+               Value="
+set VSVER=$(VSVer)&#x0D;&#x0A;
+set CONF=$(ConfigurationName)&#x0D;&#x0A;
+set PLAT=$(PlatformName)&#x0D;&#x0A;
+set BASEDIR=$(GlibEtcInstallRootFromBuildWin32)&#x0D;&#x0A;
+
+cd ..&#x0D;&#x0A;
+call gengir_jsonglib.bat&#x0D;&#x0A;
+cd vs$(VSVer)&#x0D;&#x0A;
+                         "
+       />
+       <UserMacro
                Name="JsonGlibGenerateDef"
                Value="
 echo EXPORTS &gt;$(DefDir)\json-glib.def&#x0D;&#x0A;
@@ -90,21 +111,21 @@ cl /EP ..\..\..\json-glib\json-glib.symbols &gt;&gt;$(DefDir)\json-glib.def&#x0D
                Value="-1.0-0"
        />
        <UserMacro
-               Name="JsonGlibSeparateVS9DllPrefix"
+               Name="JsonGlibSeparateVSDllPrefix"
                Value=""
        />
        <UserMacro
-               Name="JsonGlibSeparateVS9DllSuffix"
-               Value="-1-vs9"
+               Name="JsonGlibSeparateVSDllSuffix"
+               Value="-1-vs$(VSVer)"
        />
        <!-- Change these two to JsonGlibLibtoolCompatibleDllPrefix and
        JsonGlibLibtoolCompatibleDllSuffix if that is what you want -->
        <UserMacro
                Name="JsonGlibDllPrefix"
-               Value="$(JsonGlibSeparateVS9DllPrefix)"
+               Value="$(JsonGlibSeparateVSDllPrefix)"
        />
        <UserMacro
                Name="JsonGlibDllSuffix"
-               Value="$(JsonGlibSeparateVS9DllSuffix)"
+               Value="$(JsonGlibSeparateVSDllSuffix)"
        />
 </VisualStudioPropertySheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]