summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-05-17 19:53:25 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-03 17:59:25 +0200
commit5d8b8eed90c52afbd54d7c057657dc12d1e8e61a (patch)
tree4d491db695b6f40a2cbc715994d64d97b40ea820 /bin
parent5c555e3a296af3f2510fdc95caa864f020e69263 (diff)
move module version header generation back to syncqt
there is no particular reason for it being done by qmake. avoids that the logic is distributed over two source files, and allows us to generate these headers at pre-build time already, including not forwarding to a yet unexisting file (which would have a yet unknown location). Change-Id: I9c78ab425cf6f01d076c86fd1ee602626f231487 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 8ce091053f..f31466ad33 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -1094,6 +1094,19 @@ foreach my $lib (@modules_to_sync) {
syncHeader($lib, $VHeader, $vheader, 0);
$pri_install_files .= fixPaths($vheader, $dir) . " ";
$pri_install_classes .= fixPaths($VHeader, $dir) . " ";
+ my @versions = split(/\./, $module_version);
+ my $modulehexstring = sprintf("0x%02X%02X%02X", $versions[0], $versions[1], $versions[2]);
+ my $vhdrcont =
+ "/* This file was generated by syncqt. */\n".
+ "#ifndef QT_".uc($lib)."_VERSION_H\n".
+ "#define QT_".uc($lib)."_VERSION_H\n".
+ "\n".
+ "#define ".uc($lib)."_VERSION_STR \"".$module_version."\"\n".
+ "\n".
+ "#define ".uc($lib)."_VERSION ".$modulehexstring."\n".
+ "\n".
+ "#endif // QT_".uc($lib)."_VERSION_H\n";
+ writeFile($vheader, $vhdrcont, $lib, "version header");
#handle the headers.pri for each module
my $headers_pri_contents = "";