[Cogl] [1.16][Patch]: Add Autotools Items to Complete the Cogl-Path MSVC Projects
Fan Chun-wei
fanc999 at yahoo.com.tw
Tue Aug 27 03:06:44 PDT 2013
Hi,
[Sorry, I accidently sent this mail from my gmail account, which was not
used to subscribe to the Cogl mailing list]
As the Cogl library has split out Cogl-Path, a new Visual Studio project
file needs to be created for this purpose, especially as Cogl-Path is
currently built into the main Cogl library to maintain ABI/API
compatibility. I have done some autotools items so that this could be
used now for making:
-The Cogl-Path project files have their source files listing filled in
automatically during 'make dist'
-The Cogl-Path project files can be distributed in the tarball
The Makefile-msvcproj.mak file can also be included for the Cogl and
Cogl-Pango (and possibly Cogl-Gst, presumely that it runs on Windows,
didn't get to check it much yet ), but since we are getting close to the
1.16 release, I would make the conversion for Cogl and Cogl-Pango in the
next development cycle. This would have the advantage of reducing
clutter in the main Makefile.am's.
Thank you for your time, with blessings!
-------------- next part --------------
From 783be6529c96d650fcd700e2ed1907696fb1ae4c Mon Sep 17 00:00:00 2001
From: Chun-wei Fan <fanchunwei at src.gnome.org>
Date: Tue, 27 Aug 2013 17:55:39 +0800
Subject: [PATCH] Add Autotools Items to Complete the Cogl-Path MSVC Projects
This adds a centralized autotools Makefile to be used in the completion
of the project files for Cogl-Path for now, which can be used also in
Cogl, Cogl-Pango and possibly Cogl-Gst so that we could have less clutter
in the autotools files.
This patch set will also allow the Cogl-Path project files to be filled in
during 'make dist' and make them distributed during a tarball release.
---
build/Makefile-msvcproj.mak | 56 ++++++++++++++++++++++++++++++++++++++++++++
build/win32/vs10/Makefile.am | 8 +++++--
build/win32/vs9/Makefile.am | 2 ++
cogl-path/Makefile.am | 12 ++++++++++
4 files changed, 76 insertions(+), 2 deletions(-)
create mode 100644 build/Makefile-msvcproj.mak
diff --git a/build/Makefile-msvcproj.mak b/build/Makefile-msvcproj.mak
new file mode 100644
index 0000000..6640a70
--- /dev/null
+++ b/build/Makefile-msvcproj.mak
@@ -0,0 +1,56 @@
+# Centralized autotools file
+# To create the Visual C++ projects
+# from the templates
+# Author: Fan, Chun-wei
+# August 30, 2012
+
+# Required Items to call this:
+# MSVC_PROJECT: name of project
+# MSVC_PROJECT_SRCDIR: subdir of source tree where sources for this project is found
+# MSVC_PROJECT_SRCS: source files to build
+# MSVC_PROJECT_EXCLUDES: source files to exclude from MSVC_PROJECT_SRCS, use dummy if none,
+# wildcards (*) are allowed, seperated by |
+# DISTCLEANFILES: Define an empty one if not previously defined
+
+# Create the complete Visual C++ 2008/2010 project files
+
+$(top_builddir)/build/win32/vs9/$(MSVC_PROJECT).vcproj: $(top_srcdir)/build/win32/vs9/$(MSVC_PROJECT).vcprojin
+ for F in `echo $(MSVC_PROJECT_SRCS) | sed 's/\.\///g' | tr '/' '\\'`; do \
+ case $$F in \
+ $(MSVC_PROJECT_EXCLUDES)) \
+ ;; \
+ *.c) echo ' <File RelativePath="..\..\..\$(MSVC_PROJECT_SRCDIR)\'$$F'" />' \
+ ;; \
+ esac; \
+ done | sort -u >$(MSVC_PROJECT).sourcefiles
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs9/$(MSVC_PROJECT).vcprojin >$@
+ rm $(MSVC_PROJECT).sourcefiles
+
+$(top_builddir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj: $(top_srcdir)/build/win32/vs10/$(MSVC_PROJECT).vcxprojin
+ for F in `echo $(MSVC_PROJECT_SRCS) | sed 's/\.\///g' | tr '/' '\\'`; do \
+ case $$F in \
+ $(MSVC_PROJECT_EXCLUDES)) \
+ ;; \
+ *.c) echo ' <ClCompile Include="..\..\..\$(MSVC_PROJECT_SRCDIR)\'$$F'" />' \
+ ;; \
+ esac; \
+ done | sort -u >$(MSVC_PROJECT).vs10.sourcefiles
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(MSVC_PROJECT).vcxprojin >$@
+ rm $(MSVC_PROJECT).vs10.sourcefiles
+
+$(top_builddir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj.filters: $(top_srcdir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj.filtersin
+ for F in `echo $(MSVC_PROJECT_SRCS) | sed 's/\.\///g' | tr '/' '\\'`; do \
+ case $$F in \
+ $(MSVC_PROJECT_EXCLUDES)) \
+ ;; \
+ *.c) echo ' <ClCompile Include="..\..\..\$(MSVC_PROJECT_SRCDIR)\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
+ ;; \
+ esac; \
+ done | sort -u >$(MSVC_PROJECT).vs10.sourcefiles.filters
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj.filtersin >$@
+ rm $(MSVC_PROJECT).vs10.sourcefiles.filters
+
+DISTCLEANFILES += \
+ $(top_builddir)/build/win32/vs9/$(MSVC_PROJECT).vcproj \
+ $(top_builddir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj \
+ $(top_builddir)/build/win32/vs10/$(MSVC_PROJECT).vcxproj.filters
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index bfc0d66..b54bae6 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -4,8 +4,12 @@ EXTRA_DIST = \
cogl.props \
cogl.vcxproj \
cogl.vcxprojin \
- cogl.vcxproj.filters \
- cogl.vcxproj.filtersin \
+ cogl.vcxproj.filters \
+ cogl.vcxproj.filtersin \
+ cogl-path.vcxproj \
+ cogl-path.vcxprojin \
+ cogl-path.vcxproj.filters \
+ cogl-path.vcxproj.filtersin \
cogl-pango.vcxproj \
cogl-pango.vcxprojin \
cogl-pango.vcxproj.filters \
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 96b0a06..0e93a3b 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -4,6 +4,8 @@ EXTRA_DIST = \
cogl.vsprops \
cogl.vcproj \
cogl.vcprojin \
+ cogl-path.vcproj \
+ cogl-path.vcprojin \
cogl-pango.vcproj \
cogl-pango.vcprojin \
test-conformance-cogl.vcproj \
diff --git a/cogl-path/Makefile.am b/cogl-path/Makefile.am
index 8181b87..a4e3f22 100644
--- a/cogl-path/Makefile.am
+++ b/cogl-path/Makefile.am
@@ -90,3 +90,15 @@ cogl_pathheaders_HEADERS = $(source_h)
if USE_GLIB
nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h
endif
+
+dist-hook: \
+ $(top_builddir)/build/win32/vs9/cogl-path.vcproj \
+ $(top_builddir)/build/win32/vs10/cogl-path.vcxproj \
+ $(top_builddir)/build/win32/vs10/cogl-path.vcxproj.filters
+
+MSVC_PROJECT = cogl-path
+MSVC_PROJECT_SRCDIR = cogl-path
+MSVC_PROJECT_SRCS = $(source_c)
+MSVC_PROJECT_EXCLUDES = dummy
+
+include $(top_srcdir)/build/Makefile-msvcproj.mak
--
1.8.3.msysgit.0
More information about the Cogl
mailing list