[atkmm] NMake Makefiles: Use toolset version in DLL/.lib naming
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] NMake Makefiles: Use toolset version in DLL/.lib naming
- Date: Tue, 16 Jun 2020 09:02:13 +0000 (UTC)
commit 018fb12d4966e810a68cbcba5e7bcacf79815898
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jun 16 16:49:37 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 atkmm-2-28 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 and
libsigc++ to be built with that option enabled.
MSVC_NMake/config-msvc.mak | 10 +++++-----
MSVC_NMake/detectenv-msvc.mak | 45 ++++++++++++++++++++++++++++---------------
2 files changed, 35 insertions(+), 20 deletions(-)
---
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 3ea3072..f051d4b 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -46,8 +46,8 @@ ATKMM_EXTRA_INCLUDES = \
ATKMM_CFLAGS = /DATKMM_BUILD $(ATKMM_BASE_CFLAGS) $(ATKMM_EXTRA_INCLUDES)
-# We build atkmm-vc$(VSVER)0-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION).dll or
-# atkmm-vc$(VSVER)0-d-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION).dll at least
+# We build atkmm-vc$(VSVER_LIB)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION).dll or
+# atkmm-vc$(VSVER_LIB)-d-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION).dll at least
!ifdef USE_MESON_LIBS
LIBSIGC_LIBNAME = sigc-$(LIBSIGC_MAJOR_VERSION).$(LIBSIGC_MINOR_VERSION)
@@ -55,8 +55,8 @@ GLIBMM_LIBNAME = glibmm-$(GLIBMM_MAJOR_VERSION).$(GLIBMM_MINOR_VERSION)
LIBSIGC_DLL = $(LIBSIGC_LIBNAME)-0.dll
GLIBMM_DLL = $(GLIBMM_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)
+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)
LIBSIGC_DLL = $(LIBSIGC_LIBNAME).dll
GLIBMM_DLL = $(GLIBMM_LIBNAME).dll
!endif
@@ -64,7 +64,7 @@ GLIBMM_DLL = $(GLIBMM_LIBNAME).dll
LIBSIGC_LIB = $(LIBSIGC_LIBNAME).lib
GLIBMM_LIB = $(GLIBMM_LIBNAME).lib
-ATKMM_LIBNAME = atkmm-vc$(VSVER)0$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
+ATKMM_LIBNAME = atkmm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(ATKMM_MAJOR_VERSION)_$(ATKMM_MINOR_VERSION)
ATKMM_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_LIBNAME).dll
ATKMM_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(ATKMM_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]