aboutsummaryrefslogtreecommitdiff
path: root/ports/qt5-base/fixcmake.py
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-09-12 19:07:22 +0200
committerPhil Christensen <philc@microsoft.com>2019-09-12 10:07:21 -0700
commit96f4487c77fbf08518a9ee665612927c97ce8ebd (patch)
treea7b610226f798bda208a6459f26afa9922fb5dde /ports/qt5-base/fixcmake.py
parentecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea (diff)
downloadvcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.tar.gz
vcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.zip
[Qt] Update to 5.12.4 (#7667)
* update to 5.12.4 * removed port qt5-modularscripts and split it functionality into more functions into qt5-base * added qt_port_hashes.cmake for simpler upgrade. * added optional VCPKG_QT_HOST_MKSPEC and VCPKG_QT_TARGET_MKSPEC to select QTs build mkspecs from a triplet * qt_<config>.conf are now copied from the build dir instead from the port dir * fixed freetype dependencies. * cleanup of vcpkg_qmake scripts. No strange/unclear replacements anymore. * introduced vcpkg_buildpath_length_warning * changed directory layout of the qt5 installation executables and mkspecs a bit.
Diffstat (limited to 'ports/qt5-base/fixcmake.py')
-rw-r--r--ports/qt5-base/fixcmake.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/ports/qt5-base/fixcmake.py b/ports/qt5-base/fixcmake.py
index bcfb12ac5..afb127560 100644
--- a/ports/qt5-base/fixcmake.py
+++ b/ports/qt5-base/fixcmake.py
@@ -1,22 +1,29 @@
import os
import re
+import sys
from glob import glob
+port="qt5"
+if len(sys.argv) > 1:
+ port=sys.argv[1]
+
files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
+tooldir="/tools/"+port+"/bin/"
for f in files:
openedfile = open(f, "r")
builder = ""
- dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
- libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
- exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
- tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
+ dllpattern = re.compile("_install_prefix}/bin/Qt5.*d+(.dll|.so)")
+ libpattern = re.compile("_install_prefix}/lib/Qt5.*d+(.lib|.a)")
+ exepattern = re.compile("_install_prefix}/bin/[a-z]+(.exe|)")
+ toolexepattern = re.compile("_install_prefix}/tools/qt5/bin/[a-z]+(.exe|)")
+ tooldllpattern = re.compile("_install_prefix}/tools/qt5/bin/Qt5.*d+(.dll|.so)")
for line in openedfile:
if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
- builder += "\n " + line.replace("/tools/qt5/", "/bin/")
+ builder += "\n " + line.replace("/tools/qt5/bin", "/bin/")
builder += " else()"
- builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
+ builder += "\n " + line.replace("/tools/qt5/debug/bin", "/debug/bin/")
builder += " endif()\n"
elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
@@ -58,11 +65,13 @@ for f in files:
elif libpattern.search(line) != None:
builder += line.replace("/lib/", "/debug/lib/")
elif tooldllpattern.search(line) != None:
- builder += line.replace("/tools/qt5/", "/debug/bin/")
+ builder += line.replace("/tools/qt5/bin", "/debug/bin/")
elif exepattern.search(line) != None:
- builder += line.replace("/bin/", "/tools/qt5/")
+ builder += line.replace("/bin/", tooldir)
+ elif toolexepattern.search(line) != None:
+ builder += line.replace("/tools/qt5/bin/",tooldir)
else:
builder += line
new_file = open(f, "w")
new_file.write(builder)
- new_file.close() \ No newline at end of file
+ new_file.close()