summaryrefslogtreecommitdiff
path: root/expat
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2019-08-29 01:59:14 +0200
committerSebastian Pipping <sebastian@pipping.org>2019-08-29 02:30:34 +0200
commit208e9b4f60e92dcaf308b77cb026b0467f70d5d7 (patch)
tree993960b614a47c0f174f19cfe9f16713da98fbf9 /expat
parentee9a7a718eefa29768cbadfe6ef469b640e9a295 (diff)
downloadlibexpat-git-208e9b4f60e92dcaf308b77cb026b0467f70d5d7.tar.gz
CMake: Re-introduce MT/MD postfix for static windows .lib files
Diffstat (limited to 'expat')
-rw-r--r--expat/CMakeLists.txt10
-rw-r--r--expat/Changes2
-rw-r--r--expat/win32/build_expat_iss.bat4
3 files changed, 12 insertions, 4 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
index a91679e1..e7c7b28c 100644
--- a/expat/CMakeLists.txt
+++ b/expat/CMakeLists.txt
@@ -187,6 +187,14 @@ if(WIN32)
set(_POSTFIX_WIDE "w")
endif()
+ if(NOT BUILD_shared)
+ if(MSVC_USE_STATIC_CRT)
+ set(_POSTFIX_CRT "MT")
+ else()
+ set(_POSTFIX_CRT "MD")
+ endif()
+ endif()
+
foreach(postfix_var
CMAKE_DEBUG_POSTFIX
CMAKE_RELEASE_POSTFIX
@@ -199,7 +207,7 @@ if(WIN32)
set(_POSTFIX_DEBUG "")
endif()
- set(${postfix_var} "${_POSTFIX_WIDE}${_POSTFIX_DEBUG}" CACHE STRING "Windows binary postfix, e.g. expat<postfix=[w][d]>.dll")
+ set(${postfix_var} "${_POSTFIX_WIDE}${_POSTFIX_DEBUG}${_POSTFIX_CRT}" CACHE STRING "Windows binary postfix, e.g. expat<postfix=[w][d][MD|MT]>.lib")
endforeach()
endif(WIN32)
diff --git a/expat/Changes b/expat/Changes
index 74b4806e..1a9eaf68 100644
--- a/expat/Changes
+++ b/expat/Changes
@@ -27,7 +27,7 @@ Release x.x.x xxx xxx xx xxxx
#265 CMake: Fix linking with MinGW
#316 CMake: Windows: Make binary postfix match MSVC
Old: expat[d].lib
- New: expat[w][d].lib
+ New: expat[w][d][MD|MT].lib
CMake: Migrate files from Windows to Unix line endings
#299 #302 Windows: Replace LoadLibrary hack to access
unofficial API function SystemFunction036 (RtlGenRandom)
diff --git a/expat/win32/build_expat_iss.bat b/expat/win32/build_expat_iss.bat
index 93f8fa45..80304576 100644
--- a/expat/win32/build_expat_iss.bat
+++ b/expat/win32/build_expat_iss.bat
@@ -57,7 +57,7 @@ CD build_static_char || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_static_char\%CONFIGURATION%\expat.lib %BINDIR%\expatMT.lib || EXIT /b 1
+COPY build_static_char\%CONFIGURATION%\expatMT.lib %BINDIR%\ || EXIT /b 1
COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1
@@ -77,7 +77,7 @@ CD build_static_wchar_t || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_static_wchar_t\%CONFIGURATION%\expatw.lib %BINDIR%\expatwMT.lib || EXIT /b 1
+COPY build_static_wchar_t\%CONFIGURATION%\expatwMT.lib %BINDIR%\ || EXIT /b 1
DIR %BINDIR% || EXIT /b 1