summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-07-27 15:24:43 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-07-27 16:22:40 +0800
commit2089d2f149f05f5fed84270e62be8ca69dbc2e6a (patch)
tree28c9d917a12df9548366d3a7676c0c7b8cdfae9f
parent68e19d7c494c25622d37acfd20f71ae7622b2a62 (diff)
downloadlibcroco-2089d2f149f05f5fed84270e62be8ca69dbc2e6a.tar.gz
Build: Clean Up MSVC Project Generation
Add and use a common autotools module, which can be used to generate the various Visual Studio 2008/2010 project files, which also have the following benefits: -Have the header installation porperty sheet also generated from the templates using 'make dist', to ensure the headers listings are kept up-to-date between releases. -Make src/Makefile.am cleaner -Support out-of-tree builds and 'make -jN dist' better Also improve the debugging experience for the stack by copying the .pdb files, which are already generated for all builds.
-rw-r--r--build/Makefile.msvcproj103
-rw-r--r--build/win32/vs10/Makefile.am20
-rw-r--r--build/win32/vs10/croco-install.props111
-rw-r--r--build/win32/vs10/croco-install.propsin52
-rw-r--r--build/win32/vs10/croco.vcxproj.filtersin4
-rw-r--r--build/win32/vs10/croco.vcxprojin4
-rw-r--r--build/win32/vs9/Makefile.am28
-rw-r--r--build/win32/vs9/croco-install.vsprops69
-rw-r--r--build/win32/vs9/croco-install.vspropsin44
-rw-r--r--build/win32/vs9/croco.vcprojin2
-rw-r--r--src/Makefile.am41
11 files changed, 251 insertions, 227 deletions
diff --git a/build/Makefile.msvcproj b/build/Makefile.msvcproj
new file mode 100644
index 0000000..5d9cdc5
--- /dev/null
+++ b/build/Makefile.msvcproj
@@ -0,0 +1,103 @@
+# Author: Fan, Chun-wei
+# Common Autotools file used to generate Visual Studio 2008+
+# Projects from their templates
+
+# * Input variables:
+#
+# MSVCPROJS - List of Projects that should be generated
+#
+# * Simple tutorial
+#
+# Add this to Makefile.am where your library/program is built:
+# include $(top_srcdir)/build/Makefile.msvcproj
+# MSVCPROJS = YourProject (can be multiple projects in a single srcdir)
+# YourProject_FILES = $(libyourlib_1_0_SOURCES)
+# YourProject_EXCLUDES = ... # list of sources to exclude, separated by '|', wildcards allowed; use random unsed value if none
+# YourProject_HEADERS_DIR = $(libyourlibincludedir)
+# YourProject_HEADERS_INST = $(libyourlib_1_0_HEADERS)
+# YourProject_HEADERS_EXCLUDES = ... # <list of headers to exclude from installation, separated by '|', wildcards allowed; use random unsed value if none>
+#
+# dist-hook: \ # (or add to it if it is already there, note the vs9 items will also call the vs10 items in the process)
+# $(top_builddir)/build/win32/vs9/YourProject.vcproj \
+# $(top_builddir)/build/win32/vs9/YourProject.headers
+
+
+# Private functions
+
+## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable
+## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0
+_proj_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+_proj_path_raw:=$(subst $(abs_top_srcdir)/,,$(abs_srcdir))
+_proj_path=$(subst /,\\,$(_proj_path_raw))
+_proj_subdir_int=$(if $(ifeq $(_proj_path),\.),\\,\\$(_proj_path)\\)
+_proj_subdir=$(subst \\.\\,\\,$(_proj_subdir_int))
+
+_proj_files_raw=$(subst /,\\,$($(_proj_name)_FILES))
+_proj_files=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_files_raw))))
+_proj_filters=$($(_proj_name)_EXCLUDES)
+
+_proj_headers_raw=$(subst /,\\,$($(_proj_name)_HEADERS_INST))
+_proj_headers=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_headers_raw))))
+_proj_headers_excludes=$($(_proj_name)_HEADERS_EXCLUDES)
+
+_headers_dest_posix=$(subst $(includedir),,$($(_proj_name)_HEADERS_DIR))
+_headers_destdir=$(subst /,\\,$(_headers_dest_posix))
+
+#
+# Creates Visual Studio 2008/2010 projects from items passed in from autotools files
+# $(1) - Base Name of the MSVC project files (outputs)
+#
+
+define msvcproj-builder
+
+$(top_builddir)/build/win32/vs10/$(1).vcxproj: $(top_builddir)/build/win32/vs9/$(1).vcproj
+$(top_builddir)/build/win32/vs10/$(1).vcxproj.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
+$(1).sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
+$(1).vs10.sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
+$(1).vs10.sourcefiles.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
+
+$(top_builddir)/build/win32/vs9/$(1).vcproj:
+ -$(RM) $(top_builddir)/build/win32/vs9/$(1).vcproj
+ -$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
+ -$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
+
+ for F in $(_proj_files); do \
+ case $$$$F in \
+ $(_proj_filters)) \
+ ;; \
+ *.c|*.cpp|*.cc|*.cxx) \
+ echo ' <File RelativePath="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).sourcefiles && \
+ echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs10.sourcefiles && \
+ echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs10.sourcefiles.filters \
+ ;; \
+ esac; \
+ done
+
+
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs9/$(1).vcprojin >$(top_builddir)/build/win32/vs9/$(1).vcproj
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(1).vcxprojin >$(top_builddir)/build/win32/vs10/$(1).vcxproj
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(1).vcxproj.filtersin >$(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
+ $(RM) $(1).sourcefiles
+ $(RM) $(1).vs10.sourcefiles
+ $(RM) $(1).vs10.sourcefiles.filters
+
+$(top_builddir)/build/win32/vs10/$(1).vs10.headers: $(top_builddir)/build/win32/vs9/$(1).headers
+
+$(top_builddir)/build/win32/vs9/$(1).headers:
+ -$(RM) $(top_builddir)/build/win32/vs9/$(1).headers
+ -$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers
+
+ for F in $(_proj_headers); do \
+ case $$$$F in \
+ $(_proj_headers_excludes)) \
+ ;; \
+ *.h|*.hpp|*.hh|*.hxx) \
+ echo 'copy ..\..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F'&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/$(1).headers && \
+ echo 'copy ..\..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/build/win32/vs10/$(1).vs10.headers \
+ ;; \
+ esac; \
+ done
+
+endef
+
+$(foreach proj,$(MSVCPROJS),$(eval $(call msvcproj-builder,$(proj))))
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index 408896c..4006e4b 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -16,18 +16,28 @@
#Author: Fan, Chun-wei
#See COPYRIGHTS file for copyright information.
+GENERATED_ITEMS = \
+ croco.vcxproj \
+ croco.vcxproj.filters \
+ croco-install.props \
+ croco-version-paths.props
+
EXTRA_DIST = \
croco.vcxprojin \
croco.vcxproj.filtersin \
- croco.vcxproj \
- croco.vcxproj.filters \
csslint.vcxproj \
csslint.vcxproj.filters \
install.vcxproj \
libcroco.sln \
croco-build-defines.props \
croco-gen-srcs.props \
- croco-install.props \
- croco-version-paths.props \
- croco-version-paths.props.in
+ croco-install.propsin \
+ croco-version-paths.props.in \
+ $(GENERATED_ITEMS)
+
+croco-install.props: $(top_srcdir)/build/win32/vs10/croco-install.propsin
+ $(CPP) -P - <$< > $@
+ -rm croco.vs10.headers
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
diff --git a/build/win32/vs10/croco-install.props b/build/win32/vs10/croco-install.props
deleted file mode 100644
index 9e34a23..0000000
--- a/build/win32/vs10/croco-install.props
+++ /dev/null
@@ -1,111 +0,0 @@
-<?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 DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="croco-build-defines.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros">
- <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
- <InstalledDlls>$(BinDir)\$(GlibDllPrefix)croco(GlibDllSuffix).dll</InstalledDlls>
- <InstalledBins>$(BinDir)\csslint.exe</InstalledBins>
- <LibCrocoDoInstall>
-mkdir $(GlibEtcInstallRoot)
-
-mkdir $(GlibEtcInstallRoot)\bin
-
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.dll $(GlibEtcInstallRoot)\bin
-
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.exe $(GlibEtcInstallRoot)\bin
-
-
-mkdir $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\libcroco.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\libcroco-config.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-additional-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-attr-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-cascade.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-declaration.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-doc-handler.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-enc-handler.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-fonts.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-input.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-num.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-om-parser.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-parser.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-parsing-location.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-prop-list.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-pseudo.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-rgb.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-selector.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-sel-eng.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-simple-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-statement.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-string.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-stylesheet.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-style.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-term.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-tknzr.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-token.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-copy ..\..\..\src\cr-utils.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco
-
-
-mkdir $(GlibEtcInstallRoot)\lib
-
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(GlibEtcInstallRoot)\lib
- </LibCrocoDoInstall>
- </PropertyGroup>
- <PropertyGroup>
- <_PropertySheetDisplayName>crocoinstallprops</_PropertySheetDisplayName>
- </PropertyGroup>
- <ItemGroup>
- <BuildMacro Include="LibCrocoDoInstall">
- <Value>$(LibCrocoDoInstall)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
diff --git a/build/win32/vs10/croco-install.propsin b/build/win32/vs10/croco-install.propsin
new file mode 100644
index 0000000..d5e493d
--- /dev/null
+++ b/build/win32/vs10/croco-install.propsin
@@ -0,0 +1,52 @@
+<?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 DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="croco-build-defines.props" />
+ </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
+
+mkdir $(CopyDir)\include\libcroco-$(ApiVersion)\libcroco
+#include "croco.vs10.headers"
+
+mkdir $(CopyDir)\lib
+copy $(SolutionDir)$(Configuration)\$(Platform)\bin\croco-$(ApiVersion).lib $(CopyDir)\lib
+ </LibCrocoDoInstall>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_PropertySheetDisplayName>crocoinstallprops</_PropertySheetDisplayName>
+ </PropertyGroup>
+ <ItemGroup>
+ <BuildMacro Include="LibCrocoDoInstall">
+ <Value>$(LibCrocoDoInstall)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/croco.vcxproj.filtersin b/build/win32/vs10/croco.vcxproj.filtersin
index add48ee..937c204 100644
--- a/build/win32/vs10/croco.vcxproj.filtersin
+++ b/build/win32/vs10/croco.vcxproj.filtersin
@@ -34,10 +34,10 @@ See COPYRIGHTS file for copyright information.
</Filter>
</ItemGroup>
<ItemGroup>
-#include "libcroco.vs10.sourcefiles.filters"
+#include "croco.vs10.sourcefiles.filters"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\src\libcroco.symbols"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/build/win32/vs10/croco.vcxprojin b/build/win32/vs10/croco.vcxprojin
index 3458a24..580a455 100644
--- a/build/win32/vs10/croco.vcxprojin
+++ b/build/win32/vs10/croco.vcxprojin
@@ -198,7 +198,7 @@ See COPYRIGHTS file for copyright information.
</Link>
</ItemDefinitionGroup>
<ItemGroup>
-#include "libcroco.vs10.sourcefiles"
+#include "croco.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
@@ -233,4 +233,4 @@ See COPYRIGHTS file for copyright information.
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 20e5411..9e5f2bc 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -16,14 +16,24 @@
#Author: Fan, Chun-wei
#See COPYRIGHTS file for copyright information.
+GENERATED_ITEMS = \
+ croco.vcproj \
+ croco-install.vsprops \
+ croco-version-paths.vsprops
+
EXTRA_DIST = \
- croco.vcprojin \
- croco.vcproj \
- csslint.vcproj \
- install.vcproj \
- libcroco.sln \
+ croco.vcprojin \
+ csslint.vcproj \
+ install.vcproj \
+ libcroco.sln \
croco-build-defines.vsprops \
- croco-gen-srcs.vsprops \
- croco-install.vsprops \
- croco-version-paths.vsprops \
- croco-version-paths.vsprops.in
+ croco-gen-srcs.vsprops \
+ croco-install.vspropsin \
+ croco-version-paths.vsprops.in \
+ $(GENERATED_ITEMS)
+
+croco-install.vsprops: $(top_srcdir)/build/win32/vs9/croco-install.vspropsin
+ $(CPP) -P -<$< >$@
+ -rm croco.headers
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
diff --git a/build/win32/vs9/croco-install.vsprops b/build/win32/vs9/croco-install.vsprops
deleted file mode 100644
index a8461f7..0000000
--- a/build/win32/vs9/croco-install.vsprops
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<!--
-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.
--->
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="crocoinstallprops"
- InheritedPropertySheets=".\croco-build-defines.vsprops"
- >
- <UserMacro
- Name="LibCrocoDoInstall"
- Value="
-mkdir $(GlibEtcInstallRoot)&#x0D;&#x0A;
-mkdir $(GlibEtcInstallRoot)\bin&#x0D;&#x0A;
-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.dll $(GlibEtcInstallRoot)\bin&#x0D;&#x0A;
-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.exe $(GlibEtcInstallRoot)\bin&#x0D;&#x0A;
-
-mkdir $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\libcroco.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\libcroco-config.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-additional-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-attr-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-cascade.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-declaration.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-doc-handler.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-enc-handler.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-fonts.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-input.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-num.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-om-parser.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-parser.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-parsing-location.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-prop-list.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-pseudo.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-rgb.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-selector.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-sel-eng.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-simple-sel.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-statement.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-string.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-stylesheet.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-style.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-term.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-tknzr.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-token.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-copy ..\..\..\src\cr-utils.h $(GlibEtcInstallRoot)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
-
-mkdir $(GlibEtcInstallRoot)\lib&#x0D;&#x0A;
-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(GlibEtcInstallRoot)\lib&#x0D;&#x0A;
-"
- />
-</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/croco-install.vspropsin b/build/win32/vs9/croco-install.vspropsin
new file mode 100644
index 0000000..a15e2ca
--- /dev/null
+++ b/build/win32/vs9/croco-install.vspropsin
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<!--
+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.
+-->
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="crocoinstallprops"
+ InheritedPropertySheets=".\croco-build-defines.vsprops"
+ >
+ <UserMacro
+ Name="LibCrocoDoInstall"
+ Value="
+mkdir $(GlibEtcInstallRoot)&#x0D;&#x0A;
+mkdir $(GlibEtcInstallRoot)\bin&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(LibCrocoDllPrefix)croco$(LibCrocoDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\csslint.exe $(CopyDir)\bin&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\csslint.pdb $(CopyDir)\bin&#x0D;&#x0A;
+
+mkdir $(CopyDir)\include\libcroco-$(ApiVersion)\libcroco&#x0D;&#x0A;
+#include "croco.headers"
+
+mkdir $(CopyDir)\lib&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
+"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/croco.vcprojin b/build/win32/vs9/croco.vcprojin
index a3d0829..eb30831 100644
--- a/build/win32/vs9/croco.vcprojin
+++ b/build/win32/vs9/croco.vcprojin
@@ -193,7 +193,7 @@ See COPYRIGHTS file for copyright information.
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
-#include "libcroco.sourcefiles"
+#include "croco.sourcefiles"
</Filter>
<Filter
Name="Headers"
diff --git a/src/Makefile.am b/src/Makefile.am
index 4017338..54a4924 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -115,34 +115,19 @@ libcroco_0_6_la_LIBADD = \
EXTRA_DIST = libcroco.symbols
-dist-hook: ../build/win32/vs9/croco.vcproj ../build/win32/vs10/croco.vcxproj ../build/win32/vs10/croco.vcxproj.filters
+# MSVC Build Items
-../build/win32/vs9/croco.vcproj: $(top_srcdir)/build/win32/vs9/croco.vcprojin
- for F in $(libcroco_0_6_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <File RelativePath="..\..\..\src\'$$F'" />' \
- ;; \
- esac; \
- done >libcroco.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/croco.vcprojin >$@
- rm libcroco.sourcefiles
+MSVCPROJS = croco
-../build/win32/vs10/croco.vcxproj: $(top_srcdir)/build/win32/vs10/croco.vcxprojin
- for F in $(libcroco_0_6_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\src\'$$F'" />' \
- ;; \
- esac; \
- done >libcroco.vs10.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/croco.vcxprojin >$@
- rm libcroco.vs10.sourcefiles
+croco_FILES = $(libcroco_0_6_la_SOURCES)
+croco_EXCLUDES = dummy
-../build/win32/vs10/croco.vcxproj.filters: $(top_srcdir)/build/win32/vs10/croco.vcxproj.filtersin
- for F in $(libcroco_0_6_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\src\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
- ;; \
- esac; \
- done >libcroco.vs10.sourcefiles.filters
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/croco.vcxproj.filtersin >$@
- rm libcroco.vs10.sourcefiles.filters
+croco_HEADERS_DIR = $(crocoincdir)
+croco_HEADERS_INST = $(crocoinc_HEADERS)
+croco_HEADERS_EXCLUDES = dummy
+
+include $(top_srcdir)/build/Makefile.msvcproj
+
+dist-hook: \
+ $(top_builddir)/build/win32/vs9/croco.vcproj \
+ $(top_builddir)/build/win32/vs9/croco.headers