diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2017-03-03 12:04:59 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2017-03-03 12:04:59 +0800 |
commit | 378363949d4e1337a1fc55c3fd6848e65605ab82 (patch) | |
tree | 8f1f8b9ee1561e936e730b4bcb7a4305110f555e | |
parent | d20188b9945ac8f20ae6467112fe7f5fbc3c913d (diff) | |
download | libcroco-378363949d4e1337a1fc55c3fd6848e65605ab82.tar.gz |
Visual Studio builds: Generate .pc files
Generate and copy the libcroco-0.6.pc during the "install" stage of the
build, when a Python installation is found at the configured location in
croco-version-paths.[vsprops|props].
Also fix the 201x "install" project as a "'" is missed, and clean up
things a bit.
-rw-r--r-- | win32/vs10/Makefile.am | 1 | ||||
-rw-r--r-- | win32/vs10/croco-install.propsin | 26 | ||||
-rw-r--r-- | win32/vs10/croco-install.vcxproj | 12 | ||||
-rw-r--r-- | win32/vs10/croco-install.vcxproj.filters | 29 | ||||
-rw-r--r-- | win32/vs10/croco-version-paths.props.in | 4 | ||||
-rw-r--r-- | win32/vs11/Makefile.am | 1 | ||||
-rw-r--r-- | win32/vs12/Makefile.am | 1 | ||||
-rw-r--r-- | win32/vs14/Makefile.am | 1 | ||||
-rw-r--r-- | win32/vs15/Makefile.am | 1 | ||||
-rw-r--r-- | win32/vs9/croco-install.vcproj | 46 | ||||
-rw-r--r-- | win32/vs9/croco-install.vspropsin | 7 | ||||
-rw-r--r-- | win32/vs9/croco-version-paths.vsprops.in | 4 |
12 files changed, 120 insertions, 13 deletions
diff --git a/win32/vs10/Makefile.am b/win32/vs10/Makefile.am index f89cbea..fcdd2f8 100644 --- a/win32/vs10/Makefile.am +++ b/win32/vs10/Makefile.am @@ -28,6 +28,7 @@ EXTRA_DIST = \ csslint.vcxproj \ csslint.vcxproj.filters \ croco-install.vcxproj \ + croco-install.vcxproj.filters \ libcroco.sln \ croco-build-defines.props \ croco-gen-srcs.props \ diff --git a/win32/vs10/croco-install.propsin b/win32/vs10/croco-install.propsin index d5e493d..ccce87e 100644 --- a/win32/vs10/croco-install.propsin +++ b/win32/vs10/croco-install.propsin @@ -24,29 +24,39 @@ See COPYRIGHTS file for copyright information. </ImportGroup> <PropertyGroup Label="UserMacros"> <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir> - <InstalledDlls>$(BinDir)\$(GlibDllPrefix)croco(GlibDllSuffix).dll</InstalledDlls> - <InstalledBins>$(BinDir)\csslint.exe</InstalledBins> <LibCrocoDoInstall> mkdir $(CopyDir) mkdir $(CopyDir)\bin -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).dll $(CopyDir)\bin -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).pdb $(CopyDir)\bin -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\csslint.exe $(CopyDir)\bin -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\csslint.pdb $(CopyDir)\bin +copy $(BinDir)\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).dll $(CopyDir)\bin +copy $(BinDir)\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).pdb $(CopyDir)\bin +copy $(BinDir)\csslint.exe $(CopyDir)\bin +copy $(BinDir)\csslint.pdb $(CopyDir)\bin mkdir $(CopyDir)\include\libcroco-$(ApiVersion)\libcroco #include "croco.vs10.headers" -mkdir $(CopyDir)\lib -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\croco-$(ApiVersion).lib $(CopyDir)\lib +mkdir $(CopyDir)\lib\pkgconfig +copy $(BinDir)\croco-$(ApiVersion).lib $(CopyDir)\lib +copy ..\libcroco-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig </LibCrocoDoInstall> + <LibcrocoPCFiles>..\libcroco-$(ApiVersion).pc</LibcrocoPCFiles> + <LibcrocoGenPC>(if not exist $(CopyDir) mkdir $(CopyDir)) & (if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\crocopc.py --prefix=$(CopyDir) --version=$(CrocoMajorVersion).$(CrocoMinorVersion).$(CrocoMicroVersion))</LibcrocoGenPC> </PropertyGroup> <PropertyGroup> <_PropertySheetDisplayName>crocoinstallprops</_PropertySheetDisplayName> </PropertyGroup> <ItemGroup> + <BuildMacro Include="BinDir"> + <Value>$(BinDir)</Value> + </BuildMacro> <BuildMacro Include="LibCrocoDoInstall"> <Value>$(LibCrocoDoInstall)</Value> </BuildMacro> + <BuildMacro Include="LibcrocoPCFiles"> + <Value>$(LibcrocoPCFiles)</Value> + </BuildMacro> + <BuildMacro Include="LibcrocoGenPC"> + <Value>$(LibcrocoGenPC)</Value> + </BuildMacro> </ItemGroup> </Project> diff --git a/win32/vs10/croco-install.vcxproj b/win32/vs10/croco-install.vcxproj index a40ad4b..0cda335 100644 --- a/win32/vs10/croco-install.vcxproj +++ b/win32/vs10/croco-install.vcxproj @@ -99,11 +99,21 @@ See COPYRIGHTS file for copyright information. <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </ItemDefinitionGroup> <ItemGroup> + <CustomBuild Include="..\..\libcroco.pc.in"> + <Message Condition="'$(Configuration)'=='Debug'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)'=='Debug'">$(LibcrocoGenPC)</Command> + <Outputs Condition="'$(Configuration)'=='Debug'">$(LibcrocoPCFiles);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)'=='Release'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)'=='Release'">$(LibcrocoGenPC)</Command> + <Outputs Condition="'$(Configuration)'=='Release'">$(LibcrocoPCFiles);%(Outputs)</Outputs> + </CustomBuild> <CustomBuild Include="..\..\config.h.win32"> <Message Condition="'$(Configuration)'=='Debug'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)'=='Debug'">$(LibcrocoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)'=='Debug'">$(LibCrocoDoInstall)</Command> - <Outputs Condition="'$(Configuration)'=='Debug">blah;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)'=='Debug'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)'=='Release'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)'=='Release'">$(LibcrocoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)'=='Release'">$(LibCrocoDoInstall)</Command> <Outputs Condition="'$(Configuration)'=='Release'">blah;%(Outputs)</Outputs> </CustomBuild> diff --git a/win32/vs10/croco-install.vcxproj.filters b/win32/vs10/croco-install.vcxproj.filters new file mode 100644 index 0000000..9386b54 --- /dev/null +++ b/win32/vs10/croco-install.vcxproj.filters @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +This file is part of The Croco Library +This program is free software; you can redistribute it and/or +modify it under the terms of version 2.1 of the GNU Lesser General Public +License as published by the Free Software Foundation. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU Lesser General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA +Author: Fan, Chun-wei +See COPYRIGHTS file for copyright information. +--> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <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="..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild> + <CustomBuild Include="..\..\libcroco.pc.in"><Filter>Resource Files</Filter></CustomBuild> + </ItemGroup> +</Project> diff --git a/win32/vs10/croco-version-paths.props.in b/win32/vs10/croco-version-paths.props.in index 2184b21..eb4000f 100644 --- a/win32/vs10/croco-version-paths.props.in +++ b/win32/vs10/croco-version-paths.props.in @@ -34,6 +34,7 @@ See COPYRIGHTS file for copyright information. <LibCrocoSeparateVSDllSuffix>-$(ApiVersion)-vs$(VSVer)</LibCrocoSeparateVSDllSuffix> <LibCrocoDllPrefix>$(LibCrocoSeparateVSDllPrefix)</LibCrocoDllPrefix> <LibCrocoDllSuffix>$(LibCrocoSeparateVSDllSuffix)</LibCrocoDllSuffix> + <PythonPath>c:\python34</PythonPath> </PropertyGroup> <PropertyGroup> <_PropertySheetDisplayName>crocoversionpathsprops</_PropertySheetDisplayName> @@ -81,5 +82,8 @@ See COPYRIGHTS file for copyright information. <BuildMacro Include="LibCrocoDllSuffix"> <Value>$(LibCrocoDllSuffix)</Value> </BuildMacro> + <BuildMacro Include="PythonPath"> + <Value>$(PythonPath)</Value> + </BuildMacro> </ItemGroup> </Project> diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am index 7c713f2..b5f9ea9 100644 --- a/win32/vs11/Makefile.am +++ b/win32/vs11/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ csslint.vcxproj \ csslint.vcxproj.filters \ croco-install.vcxproj \ + croco-install.vcxproj.filters \ croco-build-defines.props \ croco-gen-srcs.props \ croco-install.props \ diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am index 7687c14..a3d6db1 100644 --- a/win32/vs12/Makefile.am +++ b/win32/vs12/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ csslint.vcxproj \ csslint.vcxproj.filters \ croco-install.vcxproj \ + croco-install.vcxproj.filters \ croco-build-defines.props \ croco-gen-srcs.props \ croco-install.props \ diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am index b1e7ee9..d68e3bf 100644 --- a/win32/vs14/Makefile.am +++ b/win32/vs14/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ csslint.vcxproj \ csslint.vcxproj.filters \ croco-install.vcxproj \ + croco-install.vcxproj.filters \ croco-build-defines.props \ croco-gen-srcs.props \ croco-install.props \ diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am index 9f2e096..0a4afa0 100644 --- a/win32/vs15/Makefile.am +++ b/win32/vs15/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ csslint.vcxproj \ csslint.vcxproj.filters \ croco-install.vcxproj \ + croco-install.vcxproj.filters \ croco-build-defines.props \ croco-gen-srcs.props \ croco-install.props \ diff --git a/win32/vs9/croco-install.vcproj b/win32/vs9/croco-install.vcproj index a1588b1..a48547c 100644 --- a/win32/vs9/croco-install.vcproj +++ b/win32/vs9/croco-install.vcproj @@ -58,7 +58,7 @@ See COPYRIGHTS file for copyright information. DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(LibCrocoDoInstall)" /> </Configuration> @@ -85,14 +85,52 @@ See COPYRIGHTS file for copyright information. DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(LibCrocoDoInstall)" /> </Configuration> </Configurations> - <References> - </References> <Files> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File RelativePath="..\..\libcroco.pc.in"> + <FileConfiguration Name="Debug|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(LibcrocoGenPC)" + Outputs="..\libcroco-0.6.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(LibcrocoGenPC)" + Outputs="..\libcroco-0.6.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Debug|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(LibcrocoGenPC)" + Outputs="..\libcroco-0.6.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(LibcrocoGenPC)" + Outputs="..\libcroco-0.6.pc" + /> + </FileConfiguration> + </File> + </Filter> </Files> <Globals> </Globals> diff --git a/win32/vs9/croco-install.vspropsin b/win32/vs9/croco-install.vspropsin index 9348364..63a8afb 100644 --- a/win32/vs9/croco-install.vspropsin +++ b/win32/vs9/croco-install.vspropsin @@ -34,6 +34,9 @@ copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(LibCrocoDllPrefix) copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\csslint.exe $(CopyDir)\bin
 copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\csslint.pdb $(CopyDir)\bin
 +mkdir $(CopyDir)\lib\pkgconfig
 +copy ..\libcroco-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig
 + mkdir $(CopyDir)\include\libcroco-$(ApiVersion)\libcroco
 #include "croco.headers" @@ -41,4 +44,8 @@ mkdir $(CopyDir)\lib
 copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\croco-$(ApiVersion).lib $(CopyDir)\lib
 " /> + <UserMacro + Name="LibcrocoGenPC" + Value="(if not exist $(CopyDir) mkdir $(CopyDir)) & (if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\crocopc.py --prefix=$(CopyDir) --version=$(CrocoMajorVersion).$(CrocoMinorVersion).$(CrocoMicroVersion))" + /> </VisualStudioPropertySheet> diff --git a/win32/vs9/croco-version-paths.vsprops.in b/win32/vs9/croco-version-paths.vsprops.in index f7a14ea..d03f5e8 100644 --- a/win32/vs9/croco-version-paths.vsprops.in +++ b/win32/vs9/croco-version-paths.vsprops.in @@ -81,4 +81,8 @@ See COPYRIGHTS file for copyright information. Name="LibCrocoDllSuffix" Value="$(LibCrocoSeparateVSDllSuffix)" /> + <UserMacro + Name="PythonPath" + Value="c:\python27" + /> </VisualStudioPropertySheet> |