[librsvg] Visual Studio builds: Generate .pc files upon "install"



commit 5dffb6de39a6520bf5d120f0a92273e829c69216
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Mar 6 15:04:20 2017 +0800

    Visual Studio builds: Generate .pc files upon "install"
    
    This makes it easier for build systems that demand for the presence of .pc
    files (such as Meson) to find packages.

 win32/vs12/Makefile.am                  |    1 +
 win32/vs12/rsvg-install.propsin         |   10 ++++++++++
 win32/vs12/rsvg-install.vcxproj         |   14 ++++++++++++--
 win32/vs12/rsvg-install.vcxproj.filters |   21 +++++++++++++++++++++
 win32/vs12/rsvg-version-paths.props.in  |    4 ++++
 win32/vs14/Makefile.am                  |    1 +
 win32/vs15/Makefile.am                  |    1 +
 7 files changed, 50 insertions(+), 2 deletions(-)
---
diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am
index c0d113d..188aab2 100644
--- a/win32/vs12/Makefile.am
+++ b/win32/vs12/Makefile.am
@@ -18,6 +18,7 @@ EXTRA_DIST =  \
        rsvg-convert.vcxprojin                  \
        rsvg-convert.vcxproj.filtersin          \
        rsvg-install.vcxproj                    \
+       rsvg-install.vcxproj.filters            \
        rsvg-rust.vcxproj                       \
        rsvg-view-3.vcxproj                     \
        rsvg-view-3.vcxproj.filters             \
diff --git a/win32/vs12/rsvg-install.propsin b/win32/vs12/rsvg-install.propsin
index d89c1a9..c09182b 100644
--- a/win32/vs12/rsvg-install.propsin
+++ b/win32/vs12/rsvg-install.propsin
@@ -22,8 +22,12 @@ mkdir $(CopyDir)\lib\gdk-pixbuf-2.0\2.10.0\loaders
 copy $(SolutionDir)$(Configuration)\$(Platform)\bin\rsvg-$(ApiVersion).lib $(CopyDir)\lib
 copy $(SolutionDir)$(Configuration)\$(Platform)\bin\libpixbufloader-svg.dll 
$(CopyDir)\lib\gdk-pixbuf-2.0\2.10.0\loaders
 copy $(SolutionDir)$(Configuration)\$(Platform)\bin\libpixbufloader-svg.pdb 
$(CopyDir)\lib\gdk-pixbuf-2.0\2.10.0\loaders
+
+if exist ..\librsvg-2.0.pc copy ..\librsvg-2.0.pc $(CopyDir)\lib\pkgconfig
     </RsvgDoInstall>
     <RsvgPostInstall>$(GlibEtcInstallRoot)\bin\gdk-pixbuf-query-loaders.exe &gt; 
$(CopyDir)\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache</RsvgPostInstall>
+    <RsvgPCFiles>..\librsvg-2.0.pc</RsvgPCFiles>
+    <RsvgGenPC>(if not exist $(CopyDir) mkdir $(CopyDir)) &amp; (if exist $(PythonPath)\python.exe 
$(PythonPath)\python.exe ..\rsvgpc.py --prefix=$(CopyDir) 
--version=$(RsvgMajorVersion).$(RsvgMinorVersion).$(RsvgMicroVersion))</RsvgGenPC>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>rsvginstallprops</_PropertySheetDisplayName>
@@ -36,5 +40,11 @@ copy $(SolutionDir)$(Configuration)\$(Platform)\bin\libpixbufloader-svg.pdb $(Co
     <BuildMacro Include="RsvgPostInstall">
       <Value>$(RsvgPostInstall)</Value>
     </BuildMacro>
+    <BuildMacro Include="RsvgPCFiles">
+      <Value>$(RsvgPCFiles)</Value>
+    </BuildMacro>
+    <BuildMacro Include="RsvgGenPC">
+      <Value>$(RsvgGenPC)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/win32/vs12/rsvg-install.vcxproj b/win32/vs12/rsvg-install.vcxproj
index 46e2beb..979caa9 100644
--- a/win32/vs12/rsvg-install.vcxproj
+++ b/win32/vs12/rsvg-install.vcxproj
@@ -76,11 +76,21 @@
   <ItemGroup>
     <CustomBuild Include="placeholder">
       <Message Condition="'$(Configuration)'=='Debug'">Copying Build Results...</Message>
+      <AdditionalInputs Condition="'$(Configuration)'=='Debug'">$(RsvgPCFiles)</AdditionalInputs>
       <Command Condition="'$(Configuration)'=='Debug'">$(RsvgDoInstall)$(RsvgPostInstall)</Command>
-      <Outputs Condition="'$(Configuration)'=='Debug'">placeholder;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)'=='Debug'">install_placeholder;%(Outputs)</Outputs>
       <Message Condition="'$(Configuration)'=='Release'">Copying Build Results...</Message>
+      <AdditionalInputs Condition="'$(Configuration)'=='Release'">$(RsvgPCFiles)</AdditionalInputs>
       <Command Condition="'$(Configuration)'=='Release'">$(RsvgDoInstall)$(RsvgPostInstall)</Command>
-      <Outputs Condition="'$(Configuration)'=='Release'">placeholder;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)'=='Release'">install_placeholder;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\..\librsvg.pc.in">
+      <Message Condition="'$(Configuration)'=='Debug'">Generating .pc file...</Message>
+      <Command Condition="'$(Configuration)'=='Debug'">$(RsvgGenPC)</Command>
+      <Outputs Condition="'$(Configuration)'=='Debug'">$(RsvgPCFiles);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)'=='Release'">Generating .pc file...</Message>
+      <Command Condition="'$(Configuration)'=='Release'">$(RsvgGenPC)</Command>
+      <Outputs Condition="'$(Configuration)'=='Release'">$(RsvgPCFiles);%(Outputs)</Outputs>
     </CustomBuild>
   </ItemGroup>
   <ItemGroup>
diff --git a/win32/vs12/rsvg-install.vcxproj.filters b/win32/vs12/rsvg-install.vcxproj.filters
new file mode 100644
index 0000000..44d77e6
--- /dev/null
+++ b/win32/vs12/rsvg-install.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup>
+    <Filter Include="Sources">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Headers">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+   <CustomBuild Include="placeholder"><Filter>Resource Files</Filter></CustomBuild>
+   <CustomBuild Include="..\..\librsvg.pc.in"><Filter>Resource Files</Filter></CustomBuild>
+  </ItemGroup>
+</Project>
diff --git a/win32/vs12/rsvg-version-paths.props.in b/win32/vs12/rsvg-version-paths.props.in
index 4d3b8b3..a1ea96a 100644
--- a/win32/vs12/rsvg-version-paths.props.in
+++ b/win32/vs12/rsvg-version-paths.props.in
@@ -17,6 +17,7 @@
     <RsvgSeparateVSDllSuffix>-$(ApiVersion)-vs$(VSVer)</RsvgSeparateVSDllSuffix>
     <RsvgDllPrefix>$(RsvgSeparateVSDllPrefix)</RsvgDllPrefix>
     <RsvgDllSuffix>$(RsvgSeparateVSDllSuffix)</RsvgDllSuffix>
+    <PythonPath>c:\python34</PythonPath>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>rsvgversionpathsprops</_PropertySheetDisplayName>
@@ -65,5 +66,8 @@
     <BuildMacro Include="RsvgDllSuffix">
       <Value>$(RsvgDllSuffix)</Value>
     </BuildMacro>
+    <BuildMacro Include="PythonPath">
+      <Value>$(PythonPath)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am
index 75ddb33..4008ef1 100644
--- a/win32/vs14/Makefile.am
+++ b/win32/vs14/Makefile.am
@@ -12,6 +12,7 @@ EXTRA_DIST =    \
        rsvg-convert.vcxproj.filters            \
        rsvg-rust.vcxproj                       \
        rsvg-install.vcxproj                    \
+       rsvg-install.vcxproj.filters            \
        rsvg-view-3.vcxproj                     \
        rsvg-view-3.vcxproj.filters             \
        README.txt
diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am
index 04971a5..6ab5e42 100644
--- a/win32/vs15/Makefile.am
+++ b/win32/vs15/Makefile.am
@@ -12,6 +12,7 @@ EXTRA_DIST =    \
        rsvg-convert.vcxproj.filters            \
        rsvg-rust.vcxproj                       \
        rsvg-install.vcxproj                    \
+       rsvg-install.vcxproj.filters            \
        rsvg-view-3.vcxproj                     \
        rsvg-view-3.vcxproj.filters             \
        README.txt


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