[gtkmm/gtkmm-3-22.nmake: 4/6] build: Add NMake Makefiles for Visual Studio builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-22.nmake: 4/6] build: Add NMake Makefiles for Visual Studio builds
- Date: Mon, 29 Oct 2018 06:47:30 +0000 (UTC)
commit 01a977beb04db8588f707e7434f51558e0ea6676
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Aug 24 18:11:35 2018 +0800
build: Add NMake Makefiles for Visual Studio builds
This adds NMake Makefiles for Visual Studio 2013 and later, which will
replace the Visual Studio projects. The main motivation for this is to
ease maintenace on the Visual Studio build files, especially as sources
are often added or removed, making the project files out-of-date as they
are not generated during 'dist make'. This will share the various
filelist.am's so that any additions or removal of sources can be
reflected upon the Visual Studio builds immediately.
Since this is the C++-11 version of gtkmm which supports both Visual
Studio 2015 and 2017, we want to name the DLL and .lib to be like
<library>-vc140-3_0.[dll.lib] or <library>-vc140-d-3_0.[dll|lib] since
they both link to the v140 Windows C/C++ runtime DLLs, and thus these
DLLs and .lib's are advertised to be interoperable, as supported by
Microsoft.
Note that the master branch, which requires C++-17, is not changed
as Visual Studio 2017 is really required to build things there.
Note that as some code in the demos require compiler features that is
only available in Visual Studio 2015 or later, we only build the demos
if Visual Studio 2015 or later is used.
MSVC_NMake/Makefile.vc | 58 ++++++++++
MSVC_NMake/README | 19 ++--
MSVC_NMake/build-rules-msvc.mak | 142 +++++++++++++++++++++++++
MSVC_NMake/config-msvc.mak | 223 +++++++++++++++++++++++++++++++++++++++
MSVC_NMake/create-lists-msvc.mak | 129 ++++++++++++++++++++++
MSVC_NMake/create-lists.bat | 42 ++++++++
MSVC_NMake/detectenv-msvc.mak | 154 +++++++++++++++++++++++++++
MSVC_NMake/filelist.am | 38 +++----
MSVC_NMake/generate-msvc.mak | 39 +++++++
MSVC_NMake/info-msvc.mak | 48 +++++++++
MSVC_NMake/install.mak | 27 +++++
Makefile.am | 2 +-
README.win32 | 24 ++---
13 files changed, 900 insertions(+), 45 deletions(-)
---
diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc
new file mode 100644
index 00000000..6f6e2bda
--- /dev/null
+++ b/MSVC_NMake/Makefile.vc
@@ -0,0 +1,58 @@
+# NMake Makefile for building libsigc++ on Windows using Visual Studio
+
+# The items below this line should not be changed, unless one is maintaining
+# the NMake Makefiles. Customizations can be done in the following NMake Makefile
+# portions (please see comments in the these files to see what can be customized):
+#
+# detectenv-msvc.mak
+# config-msvc.mak
+
+!include detectenv-msvc.mak
+
+# Include the Makefile portions with the source listings
+!include ..\gdk\src\filelist.am
+!include ..\gdk\gdkmm\filelist.am
+!include ..\gtk\src\filelist.am
+!include ..\gtk\gtkmm\filelist.am
+
+# Include the Makefile portion that enables features based on user input
+!include config-msvc.mak
+
+!if "$(VALID_CFGSET)" == "TRUE"
+
+# We need Visual Studio 2013 or later
+!if $(VSVER) < 12
+VALID_MSC = FALSE
+!else
+VALID_MSC = TRUE
+!endif
+
+!if "$(VALID_MSC)" == "TRUE"
+
+# Include the Makefile portion to convert the source and header lists
+# into the lists we need for compilation and introspection
+!include create-lists-msvc.mak
+
+all: $(TARGETS) all-build-info
+
+tests: $(gtkmm_tests) all-build-info
+
+# Include the build rules for sources, DLLs and executables
+!include generate-msvc.mak
+!include build-rules-msvc.mak
+
+!include install.mak
+
+!else # "$(VALID_MSC)" == "TRUE"
+all:
+ @echo You need Visual Studio 2013 or later.
+
+!endif # "$(VALID_MSC)" == "TRUE"
+
+!else # "$(VALID_CFGSET)" == "TRUE"
+all: help
+ @echo You need to specify a valid configuration, via
+ @echo CFG=release or CFG=debug
+!endif # "$(VALID_CFGSET)" == "TRUE"
+
+!include info-msvc.mak
diff --git a/MSVC_NMake/README b/MSVC_NMake/README
index a25f7481..678546d3 100644
--- a/MSVC_NMake/README
+++ b/MSVC_NMake/README
@@ -1,13 +1,16 @@
-Building gtkmm-3.0 with Visual Studio 2013
+Building gtkmm-3.0 with Visual Studio 2013 or later
-* You will need Visual Studio 2013 (MSVC 12.0). Earlier versions of the compiler, including 11.0 and earlier
will not work.
+* You will need Visual Studio 2013 (MSVC 12.0) or later. Earlier versions of the compiler, including 11.0
+ and earlier will not work.
* Install the latest Win32 GTK+ Development files from ftp://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+
-* Build libsigc++, glibmm, cairomm and pangomm from source.
-* Add GTK+, libsigc++, glibmm, cairomm and pangomm to the include and lib paths in Visual Studio, if they
are not in
- $(srcroot)\..\vs12\$(platform)
-* Load the MSVC_Net2013/gtkmm.sln solution.
-* Build the entire solution.
-* Run the tests.
+* Build libsigc++, glibmm, cairomm atkmm and pangomm from source.
+* Use the Visual Studio command prompt that is appropriate for your build and navigate to this directory.
+* Run nmake /f Makefile.vc CFG=[debug|release]. Also pass in PREFIX=<path> to this command line if
+ GTK+, libsigc++, glibmm, cairomm, atkmm and pangomm are not in $(srcroot)\..\vs[12|14|15]\$(platform).
+ Pass in DISABLE_DEPRECATED to disable building deprecated gtkmm APIs into the final DLL.
+ Note that vs12 stands for Visual Studio 2013, vs14 stands for Visual Studio 2015 and vs15 stands for
+ Visual Studio 2017.
+* Build the tests by appending 'test' to the NMake command line in the previous step.
Timothy M. Shead & Cedric Gustin
11/04/2004
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
new file mode 100644
index 00000000..d2f85687
--- /dev/null
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -0,0 +1,142 @@
+# NMake Makefile portion for compilation rules
+# Items in here should not need to be edited unless
+# one is maintaining the NMake build files. The format
+# of NMake Makefiles here are different from the GNU
+# Makefiles. Please see the comments about these formats.
+
+# Inference rules for compiling the .obj files.
+# Used for libs and programs with more than a single source file.
+# Format is as follows
+# (all dirs must have a trailing '\'):
+#
+# {$(srcdir)}.$(srcext){$(destdir)}.obj::
+# $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
+# $<
+# <<
+{..\gdk\gdkmm\}.cc{$(CFG)\$(PLAT)\gdkmm\}.obj::
+ $(CXX) $(LIBGDKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(CFG)\$(PLAT)\gdkmm\ /c @<<
+$<
+<<
+
+{.\gdkmm\}.rc{$(CFG)\$(PLAT)\gdkmm\}.res:
+ rc /fo$@ $<
+
+{..\gtk\gtkmm\}.cc{$(CFG)\$(PLAT)\gtkmm\}.obj::
+ $(CXX) $(LIBGTKMM_CFLAGS) $(CFLAGS_NOGL) /Fo$(CFG)\$(PLAT)\gtkmm\ /c @<<
+$<
+<<
+
+{.\gtkmm\}.rc{$(CFG)\$(PLAT)\gtkmm\}.res:
+ rc /fo$@ $<
+
+{..\demos\gtk-demo\}.cc{$(CFG)\$(PLAT)\gtkmm3-demo\}.obj::
+ $(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fo$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
+$<
+<<
+
+{$(CFG)\$(PLAT)\gtkmm3-demo\}.c{$(CFG)\$(PLAT)\gtkmm3-demo\}.obj::
+ $(CC) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fo$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
+$<
+<<
+
+# Rules for building .lib files
+$(GDKMM_LIB): $(GDKMM_DLL)
+$(GTKMM_LIB): $(GTKMM_DLL)
+
+# Rules for linking DLLs
+# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
+# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
+# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)]
[/implib:$(lib_name_if_needed)] -out:$@ @<<
+# $(dependent_objects)
+# <<
+# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+$(GDKMM_DLL): $(CFG)\$(PLAT)\gdkmm\gdkmm.def $(gdkmm_OBJS)
+ link /DLL $(LDFLAGS_NOLTCG) $(GDKMM_DEP_LIBS) /implib:$(GDKMM_LIB)
/def:$(CFG)\$(PLAT)\gdkmm\gdkmm.def -out:$@ @<<
+$(gdkmm_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+$(GTKMM_DLL): $(GDKMM_LIB) $(CFG)\$(PLAT)\gtkmm\gtkmm.def $(gtkmm_OBJS)
+ link /DLL $(LDFLAGS_NOLTCG) $(GDKMM_LIB) $(GTKMM_DEP_LIBS) /implib:$(GTKMM_LIB)
/def:$(CFG)\$(PLAT)\gtkmm\gtkmm.def -out:$@ @<<
+$(gtkmm_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+# Rules for linking Executables
+# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
+# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
+# link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
+# $(dependent_objects)
+# <<
+# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+# For the gendef tool
+{.\gendef\}.cc{$(CFG)\$(PLAT)\}.exe:
+ @if not exist $(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\gendef
+ $(CXX) $(GTKMM_BASE_CFLAGS) $(CFLAGS) /Fo$(CFG)\$(PLAT)\gendef\ $< /link $(LDFLAGS) /out:$@
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+$(GTKMM3_DEMO): $(GTKMM_LIB) $(CFG)\$(PLAT)\gtkmm3-demo $(gtkmm_demo_OBJS)
+ link $(LDFLAGS) $(GTKMM_LIB) $(GDKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@ @<<
+$(gtkmm_demo_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+$(CFG)\$(PLAT)\gtkmm3-test-builder.exe: ..\tests\builder\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget.exe: ..\tests\child_widget\main.cc
..\tests\child_widget\testwindow.cc
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget2.exe: ..\tests\child_widget2\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget_managed.exe: ..\tests\child_widget_managed\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-delete_cpp_child.exe: ..\tests\delete_cpp_child\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-dialog_deletethis.exe: ..\tests\dialog_deletethis\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-main_with_options.exe: ..\tests\main_with_options\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-menu_destruction.exe: ..\tests\menu_destruction\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-object_move.exe: ..\tests\object_move\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-property_notification.exe: ..\tests\property_notification\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-refcount_dialog.exe: ..\tests\refcount_dialog\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-scrolledwindow.exe: ..\tests\scrolledwindow\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-tree_model_iterator.exe: ..\tests\tree_model_iterator\main.cc
+$(CFG)\$(PLAT)\gtkmm3-test-wrap_existing.exe: ..\tests\wrap_existing\main.cc
+
+$(CFG)\$(PLAT)\gtkmm3-test-builder.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget2.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget_managed.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-delete_cpp_child.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-dialog_deletethis.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-main_with_options.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-menu_destruction.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-object_move.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-property_notification.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-refcount_dialog.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-scrolledwindow.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-tree_model_iterator.exe \
+$(CFG)\$(PLAT)\gtkmm3-test-wrap_existing.exe:
+ @if not exist $(GTKMM_LIB) $(MAKE) /f Makefile.vc $(SAVED_OPTIONS) $(GTKMM_LIB)
+ @if not exist $(CFG)\$(PLAT)\$(@B) $(MAKE) /f Makefile.vc $(SAVED_OPTIONS) $(CFG)\$(PLAT)\$(@B)
+ $(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fo$(CFG)\$(PLAT)\$(@B)\ $** \
+ /link $(LDFLAGS) $(GTKMM_LIB) $(GDKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+clean:
+ @-del /f /q $(CFG)\$(PLAT)\*.exe
+ @-del /f /q $(CFG)\$(PLAT)\*.dll
+ @-del /f /q $(CFG)\$(PLAT)\*.pdb
+ @-del /f /q $(CFG)\$(PLAT)\*.ilk
+ @-del /f /q $(CFG)\$(PLAT)\*.exp
+ @-del /f /q $(CFG)\$(PLAT)\*.lib
+ @-for /f %d in ('dir /ad /b $(CFG)\$(PLAT)\gtkmm3-test-*') do @del /f/q $(CFG)\$(PLAT)\%d\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\gtkmm3-demo\demo_resources.c
+ @-del /f /q $(CFG)\$(PLAT)\gtkmm3-demo\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\gtkmm\*.def
+ @-del /f /q $(CFG)\$(PLAT)\gtkmm\*.res
+ @-del /f /q $(CFG)\$(PLAT)\gtkmm\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\gdkmm\*.def
+ @-del /f /q $(CFG)\$(PLAT)\gdkmm\*.res
+ @-del /f /q $(CFG)\$(PLAT)\gdkmm\*.obj
+ @-del /f /q $(CFG)\$(PLAT)\gendef\*.obj
+ @-for /f %d in ('dir /ad /b $(CFG)\$(PLAT)\gtkmm3-test-*') do @rd $(CFG)\$(PLAT)\%d
+ @-rd $(CFG)\$(PLAT)\gtkmm3-demo
+ @-rd $(CFG)\$(PLAT)\gtkmm
+ @-rd $(CFG)\$(PLAT)\gdkmm
+ @-rd $(CFG)\$(PLAT)\gendef
+ @-del /f /q vc$(PDBVER)0.pdb
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
new file mode 100644
index 00000000..0d7c52ac
--- /dev/null
+++ b/MSVC_NMake/config-msvc.mak
@@ -0,0 +1,223 @@
+# NMake Makefile portion for enabling features for Windows builds
+
+# These are the base minimum libraries required for building gtkmm.
+BASE_INCLUDES = /I$(PREFIX)\include
+
+# Please do not change anything beneath this line unless maintaining the NMake Makefiles
+
+# NMake Options
+SAVED_OPTIONS = CFG^=$(CFG)
+
+!ifdef VULKAN_SDK_DIR
+SAVED_OPTIONS = $(SAVED_OPTIONS) VULKAN_SDK_DIR^=$(VULKAN_SDK_DIR)
+!endif
+
+!ifdef DISABLE_DEPRECATED
+SAVED_OPTIONS = $(SAVED_OPTIONS) DISABLE_DEPRECATED^=$(DISABLE_DEPRECATED)
+!endif
+
+# Debug/Release builds
+!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+DEBUG_SUFFIX = -d
+!else
+DEBUG_SUFFIX =
+!endif
+
+# Dependencies
+
+GLIB_API_VERSION = 2.0
+ATK_API_VERSION = 1.0
+PANGO_API_VERSION = 1.0
+GDK_PIXBUF_API_VERSION = 2.0
+GTK_API_VERSION = 3
+
+LIBSIGC_MAJOR_VERSION = 2
+LIBSIGC_MINOR_VERSION = 0
+CAIROMM_MAJOR_VERSION = 1
+CAIROMM_MINOR_VERSION = 0
+GLIBMM_MAJOR_VERSION = 2
+GLIBMM_MINOR_VERSION = 4
+ATKMM_MAJOR_VERSION = 1
+ATKMM_MINOR_VERSION = 6
+PANGOMM_MAJOR_VERSION = 1
+PANGOMM_MINOR_VERSION = 4
+
+GTKMM_MAJOR_VERSION = 3
+GTKMM_MINOR_VERSION = 0
+
+GTKMM_CXX_INCLUDES = \
+ /I$(PREFIX)\include\pangomm-$(PANGOMM_MAJOR_VERSION).$(PANGOMM_MINOR_VERSION) \
+ /I$(PREFIX)\lib\pangomm-$(PANGOMM_MAJOR_VERSION).$(PANGOMM_MINOR_VERSION)\include \
+ /I$(PREFIX)\include\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION) \
+ /I$(PREFIX)\lib\atkmm-$(ATKMM_MAJOR_VERSION).$(ATKMM_MINOR_VERSION)\include \
+ /I$(PREFIX)\include\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION) \
+ /I$(PREFIX)\lib\giomm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include \
+ /I$(PREFIX)\include\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION) \
+ /I$(PREFIX)\lib\glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)\include \
+ /I$(PREFIX)\include\cairomm-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION) \
+ /I$(PREFIX)\lib\cairomm-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION)\include \
+ /I$(PREFIX)\include\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION) \
+ /I$(PREFIX)\lib\sigc++-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)\include
+
+GTKMM_C_INCLUDES = \
+ /I$(PREFIX)\include\gtk-$(GTK_API_VERSION).0 \
+ /I$(PREFIX)\include\gdk-pixbuf-$(GDK_PIXBUF_API_VERSION) \
+ /I$(PREFIX)\include\atk-$(ATK_API_VERSION) \
+ /I$(PREFIX)\include\pango-$(PANGO_API_VERSION) \
+ /I$(PREFIX)\include\glib-$(GLIB_API_VERSION) \
+ /I$(PREFIX)\lib\glib-$(GLIB_API_VERSION)\include
+
+GTKMM_INCLUDES = \
+ $(GTKMM_CXX_INCLUDES) \
+ $(GTKMM_C_INCLUDES)
+
+GOBJECT_LIBS = gobject-$(GLIB_API_VERSION).lib gmodule-$(GLIB_API_VERSION).lib glib-$(GLIB_API_VERSION).lib
+GIO_LIBS = gio-$(GLIB_API_VERSION).lib $(GOBJECT_LIBS)
+
+ATK_LIB = atk-$(ATK_API_VERSION).lib
+CAIRO_LIBS = cairo-gobject.lib cairo.lib
+EPOXY_LIB = epoxy.lib
+GDK_PIXBUF_LIB = gdk_pixbuf-$(GDK_PIXBUF_API_VERSION).lib
+GTK_LIBS = gtk-$(GTK_API_VERSION).0.lib gdk-$(GTK_API_VERSION).0.lib
+PANGO_LIBS = pangocairo-$(PANGO_API_VERSION).lib pango-$(PANGO_API_VERSION).lib
+
+GTKMM_LIBS_C_BASE = \
+ $(GDK_PIXBUF_LIB) \
+ $(GIO_LIBS) \
+ $(CAIRO_LIBS)
+
+GDKMM_LIBS_C = \
+ $(GTK_LIBS) \
+ $(GTKMM_LIBS_C_BASE)
+
+GDKMM_LIBS_CXX = \
+ $(GIOMM_LIB) \
+ $(GLIBMM_LIB) \
+ $(CAIROMM_LIB) \
+ $(LIBSIGC_LIB)
+
+GTKMM_LIBS_C = \
+ $(GTK_LIBS) \
+ $(PANGO_LIBS) \
+ $(ATK_LIB) \
+ $(GTKMM_LIBS_C_BASE)
+
+GDKMM_DEP_LIBS = $(GDKMM_LIBS_CXX) $(GDKMM_LIBS_C)
+
+GTKMM_DEP_LIBS = \
+ $(ATKMM_LIB) \
+ $(PANGOMM_LIB) \
+ $(GDKMM_LIBS_CXX) \
+ $(GTKMM_LIBS_C)
+
+GTKMM_DEMO_DEP_LIBS = $(GTKMM_DEP_LIBS) $(EPOXY_LIB)
+
+# CXXFLAGS
+GDKMM_BASE_CFLAGS = \
+ /I..\gdk /I.\gdkmm \
+ /wd4530 \
+ /FImsvc_recommended_pragmas.h
+
+GTKMM_BASE_CFLAGS = \
+ /I..\gtk /I.\gtkmm \
+ /wd4250 \
+ $(GDKMM_BASE_CFLAGS)
+
+LIBGDKMM_CFLAGS = \
+ /DGDKMM_BUILD \
+ $(GDKMM_BASE_CFLAGS) \
+ $(GTKMM_INCLUDES)
+
+LIBGTKMM_CFLAGS = \
+ /DGTKMM_BUILD \
+ $(GTKMM_BASE_CFLAGS) \
+ $(GTKMM_INCLUDES)
+
+GTKMM_DEMO_CFLAGS = \
+ /wd4275 \
+ $(GTKMM_BASE_CFLAGS) \
+ $(GTKMM_INCLUDES)
+
+# We build gdkmm-vc$(PDBVER)0-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
+# gdkmm-vc$(PDBVER)0-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
+# gtkmm-vc$(PDBVER)0-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
+# gtkmm-vc$(PDBVER)0-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
+
+LIBSIGC_LIBNAME = sigc-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
+
+LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll
+LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib
+
+GLIBMM_LIBNAME = glibmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
+
+GLIBMM_DLL = $(GLIBMM_LIBNAME).dll
+GLIBMM_LIB = $(GLIBMM_LIBNAME).lib
+
+GIOMM_LIBNAME = giomm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
+
+GIOMM_DLL = $(GIOMM_LIBNAME).dll
+GIOMM_LIB = $(GIOMM_LIBNAME).lib
+
+CAIROMM_LIBNAME = cairomm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
+
+CAIROMM_DLL = $(CAIROMM_LIBNAME).dll
+CAIROMM_LIB = $(CAIROMM_LIBNAME).lib
+
+ATKMM_LIBNAME = atkmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
+
+ATKMM_DLL = $(ATKMM_LIBNAME).dll
+ATKMM_LIB = $(ATKMM_LIBNAME).lib
+
+PANGOMM_LIBNAME = pangomm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
+
+PANGOMM_DLL = $(PANGOMM_LIBNAME).dll
+PANGOMM_LIB = $(PANGOMM_LIBNAME).lib
+
+GDKMM_LIBNAME = gdkmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION)
+
+GDKMM_DLL = $(CFG)\$(PLAT)\$(GDKMM_LIBNAME).dll
+GDKMM_LIB = $(CFG)\$(PLAT)\$(GDKMM_LIBNAME).lib
+
+GTKMM_LIBNAME = gtkmm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION)
+
+GTKMM_DLL = $(CFG)\$(PLAT)\$(GTKMM_LIBNAME).dll
+GTKMM_LIB = $(CFG)\$(PLAT)\$(GTKMM_LIBNAME).lib
+
+GTKMM3_DEMO = $(CFG)\$(PLAT)\gtkmm3-demo$(DEBUG_SUFFIX).exe
+
+TARGETS = $(GTKMM_LIB)
+
+!if $(VSVER) > 12
+TARGETS = $(TARGETS) $(GTKMM3_DEMO)
+!else
+!message gtkmm3-demo.exe built only on Visual Studio 2015 or later.
+!endif
+
+
+GENDEF = $(CFG)\$(PLAT)\gendef.exe
+
+GDKMM_INT_GENERATED_SOURCES = $(gdkmm_files_any_hg:.hg=.cc)
+GDKMM_INT_GENERATED_HEADERS = $(gdkmm_files_any_hg:.hg=.h)
+GDKMM_INT_GENERATED_HEADERS_P = $(gdkmm_files_any_hg:.hg=_p.h)
+GTKMM_INT_GENERATED_SOURCES = $(gtkmm_files_any_hg:.hg=.cc)
+GTKMM_INT_GENERATED_HEADERS = $(gtkmm_files_any_hg:.hg=.h)
+GTKMM_INT_GENERATED_HEADERS_P = $(gtkmm_files_any_hg:.hg=_p.h)
+GTKMM_INT_EXTRA_SOURCES = $(gtkmm_files_extra_any_cc)
+GTKMM_INT_EXTRA_HEADERS_P = $(gtkmm_files_extra_ph:/=\)
+
+ENABLED_DEPRECATED = no
+
+!ifndef DISABLE_DEPRECATED
+GDKMM_INT_GENERATED_SOURCES = $(GDKMM_INT_GENERATED_SOURCES) $(gdkmm_files_deprecated_hg:.hg=.cc)
+GTKMM_INT_GENERATED_SOURCES = $(GTKMM_INT_GENERATED_SOURCES) $(gtkmm_files_deprecated_hg:.hg=.cc)
+GTKMM_INT_EXTRA_SOURCES = $(GTKMM_INT_EXTRA_SOURCES) $(gtkmm_files_extra_deprecated_cc)
+ENABLED_DEPRECATED = yes
+!endif
+
+GDKMM_INT_GENERATED_SOURCES = $(GDKMM_INT_GENERATED_SOURCES) wrap_init.cc
+GTKMM_INT_GENERATED_SOURCES = $(GTKMM_INT_GENERATED_SOURCES) wrap_init.cc
+
+# Path to glib-compile-resources.exe
+!ifndef GLIB_COMPILE_RESOURCES
+GLIB_COMPILE_RESOURCES = $(PREFIX)\bin\glib-compile-resources.exe
+!endif
diff --git a/MSVC_NMake/create-lists-msvc.mak b/MSVC_NMake/create-lists-msvc.mak
new file mode 100644
index 00000000..b027e9b5
--- /dev/null
+++ b/MSVC_NMake/create-lists-msvc.mak
@@ -0,0 +1,129 @@
+# Convert the source listing to object (.obj) listing in
+# another NMake Makefile module, include it, and clean it up.
+# This is a "fact-of-life" regarding NMake Makefiles...
+# This file does not need to be changed unless one is maintaining the NMake Makefiles
+
+# For those wanting to add things here:
+# To add a list, do the following:
+# # $(description_of_list)
+# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)]
+# endif
+#
+# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]
+# endif
+#
+# if [call create-lists.bat footer $(makefile_snippet_file)]
+# endif
+# ... (repeat the if [call ...] lines in the above order if needed)
+# !include $(makefile_snippet_file)
+#
+# (add the following after checking the entries in $(makefile_snippet_file) is correct)
+# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the
following line is added)
+#!if [del /f /q $(makefile_snippet_file)]
+#!endif
+
+# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs,
do the following
+# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]'
+# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers):
+# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file
$(makefile_snippet_file) $(intdir)\%~nc.obj]
+#
+# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak
+# %~xc gives the file extension of a given file, %c in this case, so if %c is a.cc, %~xc means .cc
+# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a
+
+NULL=
+
+gdkmm_generated_private_headers = $(files_hg:.hg=_p.h)
+
+# For gdkmm
+
+!if [call create-lists.bat header gtkmm.mak gdkmm_OBJS]
+!endif
+
+!if [for %c in ($(GDKMM_INT_GENERATED_SOURCES)) do @if "%~xc" == ".cc" @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gdkmm\%~nc.obj]
+!endif
+
+!if [for %c in ($(gdkmm_files_extra_cc)) do @if "%~xc" == ".cc" @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gdkmm\%~nc.obj]
+!endif
+
+!if [@call create-lists.bat file gtkmm.mak ^$(CFG)\^$(PLAT)\gdkmm\gdkmm.res]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+# For gtkmm
+!if [call create-lists.bat header gtkmm.mak gtkmm_OBJS]
+!endif
+
+!if [for %c in ($(GTKMM_INT_GENERATED_SOURCES)) do @if "%~xc" == ".cc" @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gtkmm\%~nc.obj]
+!endif
+
+!if [for %c in ($(GTKMM_INT_EXTRA_SOURCES)) do @if "%~xc" == ".cc" @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gtkmm\%~nc.obj]
+!endif
+
+!if [@call create-lists.bat file gtkmm.mak ^$(CFG)\^$(PLAT)\gtkmm\gtkmm.res]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+# For gtkmm demos
+!if [call create-lists.bat header gtkmm.mak gtkmm_demo_OBJS]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.cc) do @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gtkmm3-demo\%~ns.obj]
+!endif
+
+!if [@call create-lists.bat file gtkmm.mak ^$(CFG)\^$(PLAT)\gtkmm3-demo\demo_resources.obj]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+!if [call create-lists.bat header gtkmm.mak gtkmm_demo_example_sources]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\example_*.cc) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+!if [call create-lists.bat header gtkmm.mak gtkmm_demo_resources]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.gif) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.jpg) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.png) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.webm) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.ui) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [for %s in (..\demos\gtk-demo\*.glsl) do @call create-lists.bat file gtkmm.mak %s]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+!if [call create-lists.bat header gtkmm.mak gtkmm_tests]
+!endif
+
+!if [for /f %d in ('dir /ad /b ..\tests\') do @call create-lists.bat file gtkmm.mak
^$(CFG)\^$(PLAT)\gtkmm3-test-%d.exe]
+!endif
+
+!if [call create-lists.bat footer gtkmm.mak]
+!endif
+
+!include gtkmm.mak
+
+!if [del /f /q gtkmm.mak]
+!endif
diff --git a/MSVC_NMake/create-lists.bat b/MSVC_NMake/create-lists.bat
new file mode 100644
index 00000000..ef60d5ce
--- /dev/null
+++ b/MSVC_NMake/create-lists.bat
@@ -0,0 +1,42 @@
+@echo off
+rem Simple .bat script for creating the NMake Makefile snippets.
+
+if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd
+if "%2" == "" goto error_no_destfile
+
+if "%1" == "header" goto :header
+if "%1" == "file" goto :addfile
+if "%1" == "footer" goto :footer
+
+:header
+if "%3" == "" goto error_var
+echo %3 = \>>%2
+goto done
+
+:addfile
+if "%3" == "" goto error_file
+echo. %3 \>>%2
+goto done
+
+:footer
+echo. $(NULL)>>%2
+echo.>>%2
+goto done
+
+:error_cmd
+echo Specified command '%1' was invalid. Valid commands are: header file footer.
+goto done
+
+:error_no_destfile
+echo Destination NMake snippet file must be specified
+goto done
+
+:error_var
+echo A name must be specified for using '%1'.
+goto done
+
+:error_file
+echo A file must be specified for using '%1'.
+goto done
+
+:done
\ No newline at end of file
diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak
new file mode 100644
index 00000000..9a92c110
--- /dev/null
+++ b/MSVC_NMake/detectenv-msvc.mak
@@ -0,0 +1,154 @@
+# Change this (or specify PREFIX= when invoking this NMake Makefile) if
+# necessary, so that the libs and headers of the dependent third-party
+# libraries can be located. For instance, if building from GLib's
+# included Visual Studio projects, this should be able to locate the GLib
+# build out-of-the-box if they were not moved. GLib's headers will be
+# found in $(GLIB_PREFIX)\include\glib-2.0 and
+# $(GLIB_PREFIX)\lib\glib-2.0\include and its import library will be found
+# in $(GLIB_PREFIX)\lib.
+
+!if "$(PREFIX)" == ""
+PREFIX = ..\..\vs$(VSVER)\$(PLAT)
+!endif
+
+# Location of the PERL interpreter, for running glib-mkenums. glib-mkenums
+# needs to be found in $(PREFIX)\bin. Using either a 32-bit or x64 PERL
+# interpreter are supported for either a 32-bit or x64 build.
+
+!if "$(PERL)" == ""
+PERL = perl
+!endif
+
+# Location of the Python interpreter, for building introspection. The complete set
+# of Python Modules for introspection (the giscanner Python scripts and the _giscanner.pyd
+# compiled module) needs to be found in $(PREFIX)\lib\gobject-introspection\giscanner, and
+# the g-ir-scanner Python script and g-ir-compiler utility program needs to be found
+# in $(PREFIX)\bin, together with any DLLs they will depend on, if those DLLs are not already
+# in your PATH.
+# Note that the Python interpreter and the introspection modules and utility progam must
+# correspond to the build type (i.e. 32-bit Release for 32-bit Release builds, and so on).
+#
+# For introspection, currently only Python 2.7.x is supported. This may change when Python 3.x
+# support is added upstream in gobject-introspection--when this happens, the _giscanner.pyd must
+# be the one that is built against the release series of Python that is used here.
+
+!if "$(PYTHON)" == ""
+PYTHON = python
+!endif
+
+# Location of the pkg-config utility program, for building introspection. It needs to be able
+# to find the pkg-config (.pc) files so that the correct libraries and headers for the needed libraries
+# can be located, using PKG_CONFIG_PATH. Using either a 32-bit or x64 pkg-config are supported for
+# either a 32-bit or x64 build.
+
+!if "$(PKG_CONFIG)" == ""
+PKG_CONFIG = pkg-config
+!endif
+
+# The items below this line should not be changed, unless one is maintaining
+# the NMake Makefiles. The exception is for the CFLAGS_ADD line(s) where one
+# could use his/her desired compiler optimization flags, if he/she knows what is
+# being done.
+
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
+MSG = ^
+This Makefile is only for Visual Studio 2008 and later.^
+You need to ensure that the Visual Studio Environment is properly set up^
+before running this Makefile.
+!error $(MSG)
+!endif
+
+ERRNUL = 2>NUL
+_HASH=^#
+
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+ && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+ && ![echo PLAT=Win32 >> vercl.x] \
+ && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+ && ![echo PLAT=x64 >> vercl.x] \
+ && ![echo $(_HASH)endif >> vercl.x] \
+ && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+ && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
+VSVER = 10
+!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
+VSVER = 11
+!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
+VSVER = 12
+!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
+VSVER = 14
+!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 2000
+VSVER = 15
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 15 (2017). Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!else
+!if $(VSVER) < 15
+PDBVER = $(VSVER)
+!else
+PDBVER = 14
+!endif
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "Release" || "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+VALID_CFGSET = TRUE
+!endif
+
+# One may change these items, but be sure to test
+# the resulting binaries
+!if "$(CFG)" == "release" || "$(CFG)" == "Release"
+CFLAGS_ADD_NO_GL = /MD /O2 /MP
+CFLAGS_ADD = $(CFLAGS_ADD_NO_GL) /GL
+!if "$(VSVER)" != "9"
+CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
+CFLAGS_ADD_NO_GL = $(CFLAGS_ADD_NO_GL) /d2Zi+
+!endif
+!else
+CFLAGS_ADD = /MDd /Od
+CFLAGS_ADD_NO_GL = $(CFLAGS_ADD)
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
+
+!if "$(VALID_CFGSET)" == "TRUE"
+CFLAGS_NOGL = $(CFLAGS_ADD_NO_GL) /W3 /Zi
+CFLAGS = $(CFLAGS_ADD) /W3 /Zi
+
+LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
+
+!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+ARFLAGS_NOLTCG = $(LDFLAGS_ARCH)
+ARFLAGS = $(LDFLAGS_ARCH)
+LDFLAGS_NOLTCG = $(LDFLAGS_BASE)
+LDFLAGS = $(LDFLAGS_BASE)
+!else
+ARFLAGS_NOLTCG = $(LDFLAGS_ARCH) /LTCG
+ARFLAGS = $(ARFLAGS_NOLTCG) /LTCG
+LDFLAGS_NOLTCG = $(LDFLAGS_BASE) /opt:ref
+LDFLAGS = $(LDFLAGS_NOLTCG) /LTCG
+!endif
+!endif
diff --git a/MSVC_NMake/filelist.am b/MSVC_NMake/filelist.am
index 12928c00..0055ad2c 100644
--- a/MSVC_NMake/filelist.am
+++ b/MSVC_NMake/filelist.am
@@ -1,23 +1,19 @@
## This file is part of gtkmm.
-msvc_net2013_data = \
- README \
- gtkmm.sln \
- gtkmm-build-defines.props \
- gtkmm-gen-srcs.props \
- gtkmm-version-paths.props \
- gtkmm-install.props \
- gendef.vcxproj \
- gendef.vcxproj.filters \
- gendef/gendef.cc \
- gdkmm/gdkmm.rc \
- gdkmm.vcxproj \
- gdkmm.vcxproj.filters \
- gdkmm/gdkmmconfig.h \
- gtkmm/gtkmm.rc \
- gtkmm.vcxproj \
- gtkmm.vcxproj.filters \
- gtkmm/gtkmmconfig.h \
- gtkmm3-demo.vcxproj \
- gtkmm3-demo.vcxproj.filters \
- install.vcxproj
+msvc_nmake_data = \
+ README \
+ build-rules-msvc.mak \
+ config-msvc.mak \
+ create-lists-msvc.mak \
+ create-lists.bat \
+ detectenv-msvc.mak \
+ filelist.am \
+ generate-msvc.mak \
+ gendef/gendef.cc \
+ gdkmm/gdkmm.rc \
+ gdkmm/gdkmmconfig.h \
+ gtkmm/gtkmm.rc \
+ gtkmm/gtkmmconfig.h \
+ info-msvc.mak \
+ install.mak \
+ Makefile.vc
diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak
new file mode 100644
index 00000000..2dcfef1d
--- /dev/null
+++ b/MSVC_NMake/generate-msvc.mak
@@ -0,0 +1,39 @@
+# NMake Makefile portion for code generation and
+# intermediate build directory creation
+# Items in here should not need to be edited unless
+# one is maintaining the NMake build files.
+
+# Create the build directories
+$(CFG)\$(PLAT)\gendef \
+$(CFG)\$(PLAT)\gdkmm \
+$(CFG)\$(PLAT)\gtkmm \
+$(CFG)\$(PLAT)\gtkmm3-demo \
+$(CFG)\$(PLAT)\gtkmm3-test-builder \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget2 \
+$(CFG)\$(PLAT)\gtkmm3-test-child_widget_managed \
+$(CFG)\$(PLAT)\gtkmm3-test-delete_cpp_child \
+$(CFG)\$(PLAT)\gtkmm3-test-dialog_deletethis \
+$(CFG)\$(PLAT)\gtkmm3-test-main_with_options \
+$(CFG)\$(PLAT)\gtkmm3-test-menu_destruction \
+$(CFG)\$(PLAT)\gtkmm3-test-object_move \
+$(CFG)\$(PLAT)\gtkmm3-test-property_notification \
+$(CFG)\$(PLAT)\gtkmm3-test-refcount_dialog \
+$(CFG)\$(PLAT)\gtkmm3-test-scrolledwindow \
+$(CFG)\$(PLAT)\gtkmm3-test-tree_model_iterator \
+$(CFG)\$(PLAT)\gtkmm3-test-wrap_existing:
+ @-mkdir $@
+
+# Generate .def files
+$(CFG)\$(PLAT)\gdkmm\gdkmm.def: $(GENDEF) $(CFG)\$(PLAT)\gdkmm $(gdkmm_OBJS)
+ $(CFG)\$(PLAT)\gendef.exe $@ $(GDKMM_LIBNAME) $(CFG)\$(PLAT)\gdkmm\*.obj
+
+$(CFG)\$(PLAT)\gtkmm\gtkmm.def: $(GENDEF) $(CFG)\$(PLAT)\gtkmm $(gtkmm_OBJS)
+ $(CFG)\$(PLAT)\gendef.exe $@ $(GTKMM_LIBNAME) $(CFG)\$(PLAT)\gtkmm\*.obj
+
+# Generate demo GResource source file
+$(CFG)\$(PLAT)\gtkmm3-demo\demo_resources.c: \
+$(gtkmm_demo_example_sources) \
+$(gtkmm_demo_resources) \
+..\demos\gtk-demo\demo.gresource.xml
+ $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\gtk-demo --generate-source
..\demos\gtk-demo\demo.gresource.xml
diff --git a/MSVC_NMake/info-msvc.mak b/MSVC_NMake/info-msvc.mak
new file mode 100644
index 00000000..280ebbe8
--- /dev/null
+++ b/MSVC_NMake/info-msvc.mak
@@ -0,0 +1,48 @@
+# NMake Makefile portion for displaying config info
+
+all-build-info:
+ @echo.
+ @echo ----------
+ @echo Build info
+ @echo ---------
+ @echo Build Type: $(CFG)
+ @echo Enabled Deprecated APIs: $(ENABLED_DEPRECATED)
+
+help:
+ @echo.
+ @echo ============================
+ @echo Building gtkmm Using NMake
+ @echo ============================
+ @echo nmake /f Makefile.vc CFG=[release^|debug] ^<PREFIX=PATH^> ^<option1=xxx option2=xxx^>
+ @echo.
+ @echo Where:
+ @echo ------
+ @echo CFG: Required, use CFG=release for an optimized build and CFG=debug
+ @echo for a debug build. PDB files are generated for all builds.
+ @echo.
+ @echo PREFIX: Optional, the path where dependent libraries and tools may be
+ @echo found, default is ^$(srcrootdir)\..\vs^$(short_vs_ver)\^$(platform),
+ @echo where ^$(short_vs_ver) is 15 for VS 2017 and so on; and
+ @echo ^$(platform) is Win32 for 32-bit builds and x64 for x64 builds.
+ @echo.
+ @echo ------
+ @echo Possible options include the following:
+ @echo.
+ @echo DISABLE_DEPRECATED: Set to 1 to not build the deprecated APIs into
+ @echo the final DLLs.
+ @echo.
+ @echo VULKAN_SDK_DIR: Path to the base installation directory of the LunarG
+ @echo Vulkan SDK. This may be necessary if the gtk+-4.x DLLs are built with
+ @echo Vulkan enabled, so that Vulkan's headers and libraries could be found.
+ @echo.
+ @echo ======
+ @echo A 'clean' target is supported to remove all generated files, intermediate
+ @echo object files and binaries for the specified configuration.
+ @echo.
+ @echo An 'install' target is supported to copy the build (DLLs, utility programs,
+ @echo LIBs, along with the introspection files if applicable) to appropriate
+ @echo locations under ^$(PREFIX).
+ @echo.
+ @echo A 'tests' target is supported to build the gtkmm's test programs.
+ @echo ======
+ @echo.
diff --git a/MSVC_NMake/install.mak b/MSVC_NMake/install.mak
new file mode 100644
index 00000000..34f8c101
--- /dev/null
+++ b/MSVC_NMake/install.mak
@@ -0,0 +1,27 @@
+# NMake Makefile snippet for copying the built libraries, utilities and headers to
+# a path under $(PREFIX).
+
+install: all
+ @if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
+ @if not exist $(PREFIX)\lib\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include\ mkdir
$(PREFIX)\lib\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include
+ @if not exist $(PREFIX)\include\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gdkmm\private\
@mkdir $(PREFIX)\include\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gdkmm\private
+ @if not exist $(PREFIX)\lib\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include\ mkdir
$(PREFIX)\lib\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include
+ @if not exist $(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\private\
@mkdir $(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\private
+ @if exist $(CFG)\$(PLAT)\gtkmm3-demo.exe copy /b $(CFG)\$(PLAT)\gtkmm3-demo.exe $(PREFIX)\bin
+ @if exist $(CFG)\$(PLAT)\gtkmm3-demo.pdb copy /b $(CFG)\$(PLAT)\gtkmm3-demo.pdb $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(GDKMM_LIBNAME).dll $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(GTKMM_LIBNAME).dll $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(GDKMM_LIBNAME).pdb $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(GTKMM_LIBNAME).pdb $(PREFIX)\bin
+ @copy /b $(CFG)\$(PLAT)\$(GDKMM_LIBNAME).lib $(PREFIX)\lib
+ @copy /b $(CFG)\$(PLAT)\$(GTKMM_LIBNAME).lib $(PREFIX)\lib
+ @copy ..\gdk\gdkmm.h "$(PREFIX)\include\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\"
+ @for %h in ($(GDKMM_INT_GENERATED_HEADERS) $(gdkmm_files_extra_h)) do @copy ..\gdk\gdkmm\%h
"$(PREFIX)\include\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gdkmm\%h"
+ @for %h in ($(GDKMM_INT_GENERATED_HEADERS_P)) do @copy ..\gdk\gdkmm\private\%h
"$(PREFIX)\include\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gdkmm\private\%h"
+ @copy ".\gdkmm\gdkmmconfig.h"
"$(PREFIX)\lib\gdkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include\"
+ @copy ..\gtk\gtkmm.h "$(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\"
+ @for %h in ($(GTKMM_INT_GENERATED_HEADERS)) do @copy ..\gtk\gtkmm\%h
"$(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\%h"
+ @for %h in ($(gtkmm_files_extra_any_h) $(gtkmm_files_extra_deprecated_h)) do @copy ..\gtk\gtkmm\%h
"$(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\%h"
+ @for %h in ($(GTKMM_INT_GENERATED_HEADERS_P)) do @copy ..\gtk\gtkmm\private\%h
"$(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\private\%h"
+ @for %h in ($(GTKMM_INT_EXTRA_HEADERS_P)) do @copy ..\gtk\gtkmm\%h
"$(PREFIX)\include\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\gtkmm\%h"
+ @copy ".\gtkmm\gtkmmconfig.h"
"$(PREFIX)\lib\gtkmm-$(GTKMM_MAJOR_VERSION).$(GTKMM_MINOR_VERSION)\include\"
diff --git a/Makefile.am b/Makefile.am
index 9775d226..141ad3ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,7 +47,7 @@ include $(srcdir)/MSVC_NMake/filelist.am
include $(srcdir)/win32_installer/filelist.am
text_files = COPYING.tools PORTING README.SUN README.win32
-msvc_files = $(addprefix MSVC_NMake/,$(msvc_net2013_data))
+msvc_files = $(addprefix MSVC_NMake/,$(msvc_nmake_data))
winstall_files = $(addprefix win32_installer/,$(windows_installer_files))
dist_noinst_DATA = $(text_files) $(msvc_files) $(winstall_files)
diff --git a/README.win32 b/README.win32
index 46b66657..26ff1a44 100644
--- a/README.win32
+++ b/README.win32
@@ -2,8 +2,8 @@ Building gtkmm on Win32
===========================
Currently, both the mingw (native win32) gcc compiler and MS Visual
-Studio 2005 are supported. gtkmm can be built with mingw32-gcc using
-the gnu autotools (automake, autoconf, libtool). As explicitly
+Studio 2013 or later are supported. gtkmm can be built with mingw32-gcc
+using the gnu autotools (automake, autoconf, libtool). As explicitly
stated in the gtk+ for win32 distribution (http://www.gimp.org/win32/),
the gcc compiler provided by the cygwin distribution should not be
used to build gtk+/gtkmm libraries and/or applications (see the
@@ -44,20 +44,15 @@ make
make check
make install
-2. MS Visual Studio 2005
+2. MS Visual Studio 2013 or later
-Open the gtkmm.sln solution file in the MSVC_Net2003 directory. In
-the Tools/Options panel, add the appropriate GTK+, glibmm include and lib
-directories to the Projects and Solutions/VC++ directories. Build the
-solution.
+Use the Visual Studio command prompt that is appropriate for your build
+configuration, and navigate to $(srcdir)\MSVC_NMake. Run
+'nmake /f Makefile.vc CFG=[debug|release] <options> to perform the build.
+Please see MSVC_NMake\README for further info on the options.
-Important NOTE : to circumvent the C++ compiler bug described in this
-bugzilla entry (http://bugzilla.gnome.org/show_bug.cgi?id=158040), it
-is necessary to add '/vd2' to the list of compiler options when
-building and/or using gtkmm with Visual Studio 2005.
-
-gtkmm-2.8 will probably not work correctly with Visual Studio 7.1 or
-below because of the aforementioned bug.
+Due to C++-11 requirements, previous versions of Visual Studio are not
+supported.
3. Gtkmm methods and signals not available on win32
@@ -66,4 +61,3 @@ All gtkmm methods and signals are available on win32.
4. Gtkmm examples and demos on win32
All demos and examples compile/run on win32
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]