You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2021/04/09 15:51:01 UTC

svn commit: r1888565 - /subversion/trunk/build/generator/gen_win_dependencies.py

Author: rhuijben
Date: Fri Apr  9 15:51:00 2021
New Revision: 1888565

URL: http://svn.apache.org/viewvc?rev=1888565&view=rev
Log:
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.

Modified:
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1888565&r1=1888564&r2=1888565&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Fri Apr  9 15:51:00 2021
@@ -596,9 +596,14 @@ class GenDependenciesBase(gen_base.Gener
 
     # apr-Util 0.9-1.4 compiled expat to 'xml.lib', but apr-util 1.5 switched
     # to the more common 'libexpat.lib'
-    libname = 'libexpat.lib'
-    if not os.path.exists(os.path.join(lib_dir, 'libexpat.lib')):
-      libname = 'xml.lib'
+    if os.path.exists(os.path.join(lib_dir, 'libexpat.lib')):
+      # Shared or completely static build
+      libname = '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)
     xml_version = '%d.%d.%d' % version