[pangomm] NMake Makefiles: Use toolset version in DLL/.lib naming
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm] NMake Makefiles: Use toolset version in DLL/.lib naming
- Date: Tue, 16 Jun 2020 09:30:57 +0000 (UTC)
commit d2e0dd4626d70e02673789f945da444494e7219a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jun 16 17:29:28 2020 +0800
NMake Makefiles: Use toolset version in DLL/.lib naming
Instead of using the Visual Studio version ('vc150' for Visual Studio 2017),
use the toolset version ('vc141' for Visual Studio 2017 and 'vc142' for Visual
Studio 2019, as defined by Microsoft) so that we are more in-line with what
is now done in the pangomm-2-42 branch.
If using the old naming convention is desired, an NMake command line option
'USE_COMPAT_LIBS' have been added-note that this will require glibmm, cairomm,
and libsigc++ to be built with that option enabled.
MSVC_NMake/config-msvc.mak | 12 ++++++------
MSVC_NMake/detectenv-msvc.mak | 45 ++++++++++++++++++++++++++++---------------
2 files changed, 36 insertions(+), 21 deletions(-)
---
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 736f2c9..ddd1c68 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -48,8 +48,8 @@ PANGOMM_EXTRA_INCLUDES = \
LIBPANGOMM_CFLAGS = /DPANGOMM_BUILD $(PANGOMM_BASE_CFLAGS) $(PANGOMM_EXTRA_INCLUDES)
-# We build pangomm-vc$(VSVER)0-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION).dll or
-# pangomm-vc$(VSVER)0-d-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION).dll at least
+# We build pangomm-vc$(VSVER_LIB)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION).dll or
+# pangomm-vc$(VSVER_LIB)-d-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION).dll at least
!ifdef USE_MESON_LIBS
LIBSIGC_LIBNAME = sigc-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)
@@ -59,9 +59,9 @@ LIBSIGC_DLL = $(LIBSIGC_LIBNAME)-0.dll
GLIBMM_DLL = $(GLIBMM_LIBNAME)-1.dll
CAIROMM_DLL = $(CAIROMM_LIBNAME)-1.dll
!else
-LIBSIGC_LIBNAME = sigc-vc$(VSVER)0$(DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
-GLIBMM_LIBNAME = glibmm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
-CAIROMM_LIBNAME = cairomm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
+LIBSIGC_LIBNAME = sigc-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
+GLIBMM_LIBNAME = glibmm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
+CAIROMM_LIBNAME = cairomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll
GLIBMM_DLL = $(GLIBMM_LIBNAME).dll
CAIROMM_DLL = $(CAIROMM_LIBNAME).dll
@@ -71,7 +71,7 @@ LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib
GLIBMM_LIB = $(GLIBMM_LIBNAME).lib
CAIROMM_LIB = $(CAIROMM_LIBNAME).lib
-PANGOMM_LIBNAME = pangomm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
+PANGOMM_LIBNAME = pangomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
PANGOMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(PANGOMM_LIBNAME).dll
PANGOMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(PANGOMM_LIBNAME).lib
diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak
index 9a92c11..c687835 100644
--- a/MSVC_NMake/detectenv-msvc.mak
+++ b/MSVC_NMake/detectenv-msvc.mak
@@ -79,34 +79,49 @@ _HASH=^#
!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
!endif
+VSVER = 0
+PDBVER = 0
+VSVER_SUFFIX = 0
+
!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
-VSVER = 9
+PDBVER = 9
!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
-VSVER = 10
+PDBVER = 10
!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
-VSVER = 11
+PDBVER = 11
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
-VSVER = 12
-!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
-VSVER = 14
-!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 2000
+PDBVER = 12
+!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
+PDBVER = 14
+!if $(VCVERSION) > 1909 && $(VCVERSION) < 1920
+VSVER_SUFFIX = 1
VSVER = 15
+!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 2000
+VSVER_SUFFIX = 2
+VSVER = 16
!else
-VSVER = 0
+VSVER = $(PDBVER)
+!endif
+!else
+VSVER = $(PDBVER)
+!endif
+
+!if $(VSVER) > 14 && "$(USE_COMPAT_LIBS)" != ""
+!if $(VSVER) > 15
+VSVER_LIB = 150
+!else
+VSVER_LIB = $(PDBVER)0
+!endif
+!else
+VSVER_LIB = $(PDBVER)$(VSVER_SUFFIX)
!endif
!if "$(VSVER)" == "0"
MSG = ^
This NMake Makefile set supports Visual Studio^
-9 (2008) through 15 (2017). Your Visual Studio^
+9 (2008) through 16 (2019). Your Visual Studio^
version is not supported.
!error $(MSG)
-!else
-!if $(VSVER) < 15
-PDBVER = $(VSVER)
-!else
-PDBVER = 14
-!endif
!endif
VALID_CFGSET = FALSE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]