summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-01-09 14:40:42 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-01-09 17:30:44 +0800
commit46b6521c246948182d5ac19e2c5c5a719f1e3825 (patch)
tree83e83400808a5cf8541205bd7c8d28314564e324 /build
parente6f06c2d3fa75c1329a88758ed067db166dcfec7 (diff)
downloadgobject-introspection-46b6521c246948182d5ac19e2c5c5a719f1e3825.tar.gz
Visual Studio builds: Apply changes from GLib's build/
The Makefile.msvcproj and Makefile-newvs.am has been updated to accomodate visual Studio 2013 as the baseline Visual Studio version that we will support, so we need to update some things as well. We will later move the Visual Studio projects from build/win32/ to win32/
Diffstat (limited to 'build')
-rw-r--r--build/Makefile-newvs.am30
-rw-r--r--build/Makefile.msvcproj44
-rw-r--r--build/win32/vs11/Makefile.am2
-rw-r--r--build/win32/vs12/Makefile.am2
-rw-r--r--build/win32/vs14/Makefile.am2
5 files changed, 64 insertions, 16 deletions
diff --git a/build/Makefile-newvs.am b/build/Makefile-newvs.am
index b5e32160..9fd89f95 100644
--- a/build/Makefile-newvs.am
+++ b/build/Makefile-newvs.am
@@ -9,37 +9,39 @@
# Author: Fan, Chun-wei
# November 05, 2012
+# MSVC_BASE_VER: Baseline MSVC 201x version to copy/process project files from (10 for 2010, 11 for 2012, 12 for 2013, 14 for 2015 and so on)
+# MSVC_BASE_VER_LONG: Long Version of baseline Visual Studio 201x version (2010, 2012, 2013, 14 and so on)
# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
# MSVC_VER: Short Version of Visual Studio (11 for 2012, 12 for 2013, 14 for 2015 and so on)
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
%.sln:
- sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
- sed 's/2010/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
+ sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
+ sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
%.txt:
- sed 's/vs10/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
- sed 's/VS10/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
+ sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
+ sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
%.vcxproj:
- if test -e $(top_srcdir)/build/win32/vs10/$@; then \
- sed 's/v100/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
+ sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
- sed 's/v100/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
-%.props: $(top_builddir)/build/win32/vs10/Makefile
- if test -e $(top_srcdir)/build/win32/vs10/$@; then \
- sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+%.props: $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/Makefile
+ if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
+ sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
- sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.vcxproj.filters:
- if test -e $(top_srcdir)/build/win32/vs10/$@; then \
- cp $(top_srcdir)/build/win32/vs10/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
+ cp $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
- cp $(top_builddir)/build/win32/vs10/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
+ cp $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
diff --git a/build/Makefile.msvcproj b/build/Makefile.msvcproj
index f127eea5..a4e93a5d 100644
--- a/build/Makefile.msvcproj
+++ b/build/Makefile.msvcproj
@@ -17,14 +17,19 @@
# 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
+# (the following 3 lines if headers need to be installed)
# 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
-
+# $(top_builddir)/build/win32/vs9/YourProject.headers # if headers need to be installed
+#
+# --or, if Visual Studio 2013 or later is required--
+# dist-hook: \ # (or add to it if it is already there, this does -not- call other vs items in the process)
+# $(top_builddir)/build/win32/vs12/YourProject.vcxproj \
+# $(top_builddir)/build/win32/vs12/YourProject.vs12.headers # if headers need to be installed
# Private functions
@@ -109,6 +114,41 @@ $(top_builddir)/build/win32/vs9/$(1).headers: Makefile
esac; \
done
+$(top_builddir)/build/win32/vs12/$(1).vcxproj.filters: $(top_builddir)/build/win32/vs12/$(1).vcxproj
+
+$(top_builddir)/build/win32/vs12/$(1).vcxproj: Makefile
+ -$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
+ -$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
+
+ for F in $(_proj_files); do \
+ case $$$$F in \
+ $(_proj_filters)) \
+ ;; \
+ *.c|*.cpp|*.cc|*.cxx) \
+ echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs12.sourcefiles && \
+ echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs12.sourcefiles.filters \
+ ;; \
+ esac; \
+ done
+
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs12/$(1).vcxprojin >$(top_builddir)/build/win32/vs12/$(1).vcxproj
+ $(CPP) -P - <$(top_srcdir)/build/win32/vs12/$(1).vcxproj.filtersin >$(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
+ $(RM) $(1).vs12.sourcefiles
+ $(RM) $(1).vs12.sourcefiles.filters
+
+$(top_builddir)/build/win32/vs12/$(1).vs12.headers: Makefile
+ -$(RM) $(top_builddir)/build/win32/vs12/$(1).vs12.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 >>$(top_builddir)/build/win32/vs12/$(1).vs12.headers \
+ ;; \
+ esac; \
+ done
+
endef
$(foreach proj,$(MSVCPROJS),$(eval $(call msvcproj-builder,$(proj))))
diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am
index db34061b..bf9a78fc 100644
--- a/build/win32/vs11/Makefile.am
+++ b/build/win32/vs11/Makefile.am
@@ -28,6 +28,8 @@ EXTRA_DIST = \
DISTCLEANFILES = $(EXTRA_DIST)
+MSVC_BASE_VER = 10
+MSVC_BASE_VER_LONG = 2010
MSVC_VER = 11
MSVC_FORMAT_VER = 12
MSVC_VER_LONG = 2012
diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am
index 868979d2..a4379939 100644
--- a/build/win32/vs12/Makefile.am
+++ b/build/win32/vs12/Makefile.am
@@ -28,6 +28,8 @@ EXTRA_DIST = \
DISTCLEANFILES = $(EXTRA_DIST)
+MSVC_BASE_VER = 10
+MSVC_BASE_VER_LONG = 2010
MSVC_VER = 12
MSVC_FORMAT_VER = 12
MSVC_VER_LONG = 2013
diff --git a/build/win32/vs14/Makefile.am b/build/win32/vs14/Makefile.am
index 12a162c7..1d928a47 100644
--- a/build/win32/vs14/Makefile.am
+++ b/build/win32/vs14/Makefile.am
@@ -28,6 +28,8 @@ EXTRA_DIST = \
DISTCLEANFILES = $(EXTRA_DIST)
+MSVC_BASE_VER = 10
+MSVC_BASE_VER_LONG = 2010
MSVC_VER = 14
MSVC_FORMAT_VER = 12
MSVC_VER_LONG = 14