Skip to content

Commit 86b59fd

Browse files
committed
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. Also, introduce the 'USE_COMPAT_LIBS' option as well, so that we are more consistent with the other active branches of libxml++.
1 parent 1bec85f commit 86b59fd

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

MSVC_NMake/config-msvc.mak

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,23 @@ LIBXMLXX_EX_CFLAGS = $(LIBXMLXX_BASE_CFLAGS) $(LIBXMLXX_EXTRA_INCLUDES)
3030
# We build xml++-vc$(VSVER_LIB)-$(LIBXMLXX_MAJOR_VERSION)_$(LIBXMLXX_MINOR_VERSION).dll or
3131
# xml++-vc$(VSVER_LIB)-d-$(LIBXMLXX_MAJOR_VERSION)_$(LIBXMLXX_MINOR_VERSION).dll at least
3232

33-
LIBXMLXX_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\xml++-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBXMLXX_MAJOR_VERSION)_$(LIBXMLXX_MINOR_VERSION).dll
34-
LIBXMLXX_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\xml++-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBXMLXX_MAJOR_VERSION)_$(LIBXMLXX_MINOR_VERSION).lib
33+
!if "$(USE_COMPAT_LIBS)" != ""
34+
VSVER_LIB = $(VSVER)0
35+
MSVC_VSVER_LIB =
36+
!else
37+
VSVER_LIB = $(PDBVER)$(VSVER_SUFFIX)
38+
MSVC_VSVER_LIB = -vc$(VSVER_LIB)
39+
!endif
40+
41+
!ifdef USE_MESON_LIBS
42+
LIBXMLXX_LIBNAME = xml++$(MSVC_VSVER_LIB)-$(LIBXMLXX_MAJOR_VERSION).$(LIBXMLXX_MINOR_VERSION)
43+
LIBXMLXX_DLLNAME = $(LIBXMLXX_LIBNAME)-1
44+
!else
45+
LIBXMLXX_LIBNAME = xml++-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(LIBXMLXX_MAJOR_VERSION)_$(LIBXMLXX_MINOR_VERSION)
46+
LIBXMLXX_DLLNAME = $(LIBXMLXX_LIBNAME)
47+
!endif
48+
49+
LIBXMLXX_DLL = vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBXMLXX_DLLNAME).dll
50+
LIBXMLXX_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBXMLXX_LIBNAME).lib
3551

3652
LIBXML2_LIBS = libxml2.lib

0 commit comments

Comments
 (0)