Fix finding libexpat on static library builds using the current CMake build
of libexpat.
This patch was backported from the patches needed to get Subversion working
on vcpkg.
* build/generator/gen_win_dependencies.py
(_find_apr_util_etc): Find normal static build of libexpat.
@@ -596,8 +596,13 @@ class GenDependenciesBase(gen_base.GeneratorBase):
# apr-Util 0.9-1.4 compiled expat to 'xml.lib', but apr-util 1.5 switched
# to the more common 'libexpat.lib'
+ if os.path.exists(os.path.join(lib_dir, 'libexpat.lib')):
+ # Shared or completely static build
libname = 'libexpat.lib'
- if not os.path.exists(os.path.join(lib_dir, 'libexpat.lib')):
+ elif os.path.exists(os.path.join(lib_dir, 'libexpatMD.lib')):
+ # libexpat CMake build. static build against Multithreaded DLL CRT
+ libname = 'libexpatMD.lib'
+ else:
libname = 'xml.lib'
version = (major, minor, patch)
