[gtkmm] NMake Makefiles: Use toolset version in DLL/.lib naming



commit 6ce7b60bda9eb42a6108786cb0fca1f7f202b90c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Jun 19 18:25:12 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 gtkmm-3-24 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,
    pangomm, atkmm and libsigc++ to be built with that option enabled.

 MSVC_NMake/config-msvc.mak    | 25 +++++++++---------------
 MSVC_NMake/detectenv-msvc.mak | 45 ++++++++++++++++++++++++++++---------------
 2 files changed, 39 insertions(+), 31 deletions(-)
---
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 8341f2c1..805f40dd 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -184,10 +184,8 @@ GTKMM_DEMO_CFLAGS =        \
        $(GTKMM_BASE_CFLAGS)    \
        $(GTKMM_INCLUDES)
 
-# We build gdkmm-vc$(VSVER)0-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
-#          gdkmm-vc$(VSVER)0-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
-#          gtkmm-vc$(VSVER)0-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
-#          gtkmm-vc$(VSVER)0-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
+# We build gtkmm-vc$(VSVER_LIB)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
+#          gtkmm-vc$(VSVER_LIB)-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
 
 !ifdef USE_MESON_LIBS
 LIBSIGC_LIBNAME = sigc-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)
@@ -203,12 +201,12 @@ CAIROMM_DLL = $(CAIROMM_LIBNAME)-1.dll
 ATKMM_DLL = $(ATKMM_LIBNAME)-1.dll
 PANGOMM_DLL = $(PANGOMM_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)
-GIOMM_LIBNAME = giomm-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)
-ATKMM_LIBNAME = atkmm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
-PANGOMM_LIBNAME = pangomm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_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)
+GIOMM_LIBNAME = giomm-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)
+ATKMM_LIBNAME = atkmm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
+PANGOMM_LIBNAME = pangomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
 LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll
 GLIBMM_DLL = $(GLIBMM_LIBNAME).dll
 GIOMM_DLL = $(GIOMM_LIBNAME).dll
@@ -224,12 +222,7 @@ CAIROMM_LIB = $(CAIROMM_LIBNAME).lib
 ATKMM_LIB = $(ATKMM_LIBNAME).lib
 PANGOMM_LIB = $(PANGOMM_LIBNAME).lib
 
-GDKMM_LIBNAME = gdkmm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION)
-
-GDKMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(GDKMM_LIBNAME).dll
-GDKMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(GDKMM_LIBNAME).lib
-
-GTKMM_LIBNAME = gtkmm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION)
+GTKMM_LIBNAME = gtkmm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION)
 
 GTKMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(GTKMM_LIBNAME).dll
 GTKMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(GTKMM_LIBNAME).lib
diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak
index 9a92c110..c6878355 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]