summaryrefslogtreecommitdiff
path: root/win32/info-msvc.mak
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-11-26 23:42:56 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-06-14 11:33:07 +0800
commitbb7cf93a445d0043a70faa079b629966ae1a9372 (patch)
tree48727debe1f1d22cc183fa4ee4a6248aea1cbfdc /win32/info-msvc.mak
parentc7a8d32b99e0ac3ff5a21da1cb8c03e3a8fb9d43 (diff)
downloadpygobject-wip/msvc-3-24.tar.gz
Support MSVC builds of PyGObject-3.xwip/msvc-3-24
The official compiler that is supported by Python is Visual Studio, namely 2008 for 2.7.x and 3.2.x, 2010 for 3.3.x and 3.4.x and 2015 for 3.5.x and later, so this is work to add build support for Visual Studio via NMake, so that we can reduce the problems that are caused by different CRTs that are used by Python and PyGObject builds, as GLib and g-i supported builds using Visual Studio 2008~2015 for a while. Some wrapper calls are also added to setup.py so that installations using setuptools can be supported, like what is done for the autotools buids, for release builds.
Diffstat (limited to 'win32/info-msvc.mak')
-rw-r--r--win32/info-msvc.mak76
1 files changed, 76 insertions, 0 deletions
diff --git a/win32/info-msvc.mak b/win32/info-msvc.mak
new file mode 100644
index 00000000..3b8e1755
--- /dev/null
+++ b/win32/info-msvc.mak
@@ -0,0 +1,76 @@
+# NMake Makefile portion for displaying config info
+
+WITH_CAIRO = no
+
+!if "$(HAVE_PYCAIRO)" == "1"
+WITH_CAIRO = yes
+!endif
+
+!if "$(PYTHONCOMPILER)" != "MSC"
+WARN_MESSAGE=WARNING: Your Python installation is not built with Visual Studio
+!else
+!if "$(PYTHONCOMPILERVER)" == "15"
+PYMSCVER = 9
+!elseif "$(PYTHONCOMPILERVER)" == "16"
+PYMSCVER = 10
+!elseif "$(PYTHONCOMPILERVER)" == "17"
+PYMSCVER = 11
+!elseif "$(PYTHONCOMPILERVER)" == "18"
+PYMSCVER = 12
+!elseif "$(PYTHONCOMPILERVER)" == "19"
+PYMSCVER = 14
+!endif
+
+!if "$(VSVER)" == "$(PYMSCVER)"
+WARN_MESSAGE=No compiler version related warnings
+!else
+WARN_MESSAGE=WARNING: You are building PyGObject using vs$(VSVER) but Python is built with vs$(PYMSCVER).
+!endif
+!endif
+
+
+
+build-info-pygobject:
+ @echo.
+ @echo ===========================
+ @echo Configuration for PyGObject
+ @echo ===========================
+ @echo Build Type: $(CFG)
+ @echo Python Version Series: $(PYTHONSERIESDOT)
+ @echo Cairo Support: $(WITH_CAIRO)
+ @echo $(WARN_MESSAGE)
+
+all-build-info: build-info-pygobject
+
+help:
+ @echo.
+ @echo =============================
+ @echo Building PyGObject Using NMake
+ @echo =============================
+ @echo nmake /f Makefile.vc CFG=[release^|debug] ^<PREFIX=PATH^> ^<PYTHON=PATH^>
+ @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 PYTHON: Required, unless python.exe is already in your PATH.
+ @echo set to ^$(FULL_PATH_TO_PYTHON_INTERPRETOR).
+ @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 9 for VS 2008, 10 for VS 2010 and so on; and
+ @echo ^$(platform) is Win32 for 32-bit builds and x64 for x64 builds.
+ @echo ======
+ @echo A 'clean' target is supported to remove all generated files, intermediate
+ @echo object files and binaries for the specified configuration.
+ @echo.
+ @echo A 'tests' target is supported to build the test programs, use after building
+ @echo the main PyGObject Python Module.
+ @echo.
+ @echo An 'install' target is supported to copy the build to appropriate
+ @echo locations under ^$(srcroot)\build\ for preparation for packaging and/or
+ @echo testing by setting PYTHONPATH.
+ @echo ======
+ @echo.
+