summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-07-23 17:32:49 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-07-23 17:32:49 +0800
commit0a343f2d4d121ae625109c5308470016738e0986 (patch)
tree83d9f1f453724feb3d48545f536d78fa666f2a56
parent34e9c7151d42028d9de768cb4d0ea37830ec94fe (diff)
NMake Makefiles: Use Meson-style DLL and .lib naming if requested
To make things more consistent and less prone to confusion, if 'USE_MESON_LIBS' is specified in the NMake command line, build the DLLs and .lib's that are named like the Meson counterparts. Binaries built with Meson+Visual Studio and the ones that are built via NMake using 'USE_MESON_LIBS' are interchangeable, provided that they are built with the same Visual Studio version.
-rw-r--r--MSVC_NMake/config-msvc.mak19
1 files changed, 15 insertions, 4 deletions
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index c2d0344..1d14b2e 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -49,19 +49,30 @@ CAIROMM_INT_HDRS = $(cairomm_public_h:/=\)
# We build cairomm-vc$(VSVER_LIB)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION).dll or
# cairomm-vc$(VSVER_LIB)-d-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION).dll at least
+!if $(VSVER) > 14 && "$(USE_COMPAT_LIBS)" != ""
+VSVER_LIB = 150
+MESON_VSVER_LIB =
+!else
+VSVER_LIB = $(PDBVER)$(VSVER_SUFFIX)
+MESON_VSVER_LIB = -vc$(VSVER_LIB)
+!endif
+
!ifdef USE_MESON_LIBS
LIBSIGC_LIBNAME = sigc-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)
-LIBSIGC_DLL = $(LIBSIGC_LIBNAME)-0.dll
+CAIROMM_LIBNAME = cairomm$(MESON_VSVER_LIB)-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION)
+
+CAIROMM_DLLNAME = $(CAIROMM_LIBNAME)-1
!else
LIBSIGC_LIBNAME = sigc-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
-LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll
+CAIROMM_LIBNAME = cairomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
+
+CAIROMM_DLLNAME = $(CAIROMM_LIBNAME)
!endif
LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib
-CAIROMM_LIBNAME = cairomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
-CAIROMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_LIBNAME).dll
+CAIROMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_DLLNAME).dll
CAIROMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(CAIROMM_LIBNAME).lib
CAIRO_LIB = cairo.lib