diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-16 14:32:21 +0800 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-06-18 11:05:55 +0200 |
commit | ae7ef5eb5c474308971cf2ee0deec1ff40314fad (patch) | |
tree | 4590a7291ef7e3160893dc50ef93d9091732046e | |
parent | d2deab4c6da9ed77126791b42c8be257c46b0e89 (diff) | |
download | sigc++-ae7ef5eb5c474308971cf2ee0deec1ff40314fad.tar.gz |
NMake Makefiles: Use toolset version in DLL filename by default
The libsigc++ DLL and .lib was only named 'sigc-vc150(d)-3_0' until the
previous patches in this series improved Visual Studio 2019 support to
name the DLL and .lib by using 'sigc-vc160(d)-3_0'.
This updates the naming of the DLL and .lib to the toolset version as
defined by Microsoft by default, i.e. 'vc141' for Visual Studio 2017
and 'vc142' for Visual Studio 2019. If the former DLL naming ('vc150')
is desired, passing 'USE_COMPAT_LIBS=1' will achive this.
-rw-r--r-- | MSVC_NMake/README.txt | 5 | ||||
-rw-r--r-- | MSVC_NMake/config-msvc.mak | 6 | ||||
-rw-r--r-- | MSVC_NMake/detectenv-msvc.mak | 43 |
3 files changed, 36 insertions, 18 deletions
diff --git a/MSVC_NMake/README.txt b/MSVC_NMake/README.txt index d39fd59..63c021e 100644 --- a/MSVC_NMake/README.txt +++ b/MSVC_NMake/README.txt @@ -46,6 +46,11 @@ PREFIX: Optional. Base directory of where the third-party headers, libraries $(X) is the short version of the Visual Studio used, as follows:
2017: 15
+USE_COMPAT_LIBS: Build the sigc++ DLL and .lib with the filename
+ 'sigc-vc150(d)-3_0' for all builds. This is for
+ compatibility reasons, if re-building dependent code is not
+ convenient, for instance
+
Explanation of options, set by <option>=1:
------------------------------------------
BOOST_DLL: When building the benchmark, link to a DLL build of the Boost
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak index e00524f..2985437 100644 --- a/MSVC_NMake/config-msvc.mak +++ b/MSVC_NMake/config-msvc.mak @@ -24,10 +24,10 @@ LIBSIGC_INT_HDRS = $(sigc_public_h:/=\) SIGCPP_CFLAGS = $(SIGCPP_BASE_CFLAGS) $(CFLAGS) LIBSIGCPP_CFLAGS = $(SIGCPP_CFLAGS) $(LIBSIGCPP_DEFINES) -# We build sigc-vc$(VSVER)0-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll or -# sigc-vc$(VSVER)0d-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll at least +# We build sigc-vc$(VSVER_LIB)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll or +# sigc-vc$(VSVER_LIB)d-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION).dll at least -LIBSIGC_LIBNAME = sigc-vc$(VSVER)0$(LIBSIGC_DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION) +LIBSIGC_LIBNAME = sigc-vc$(VSVER_LIB)$(LIBSIGC_DEBUG_SUFFIX)-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION) LIBSIGC_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).dll LIBSIGC_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBSIGC_LIBNAME).lib diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak index 29dd53d..dd9a87a 100644 --- a/MSVC_NMake/detectenv-msvc.mak +++ b/MSVC_NMake/detectenv-msvc.mak @@ -79,36 +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) < 1920 +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 "$(USE_COMPAT_LIBS)" != "" +!if $(VSVER) > 15 +VSVER_LIB = 150 +!else +VSVER_LIB = $(VSVER)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 |