From 5d8b8eed90c52afbd54d7c057657dc12d1e8e61a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 17 May 2013 19:53:25 +0200 Subject: 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 --- bin/syncqt.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin') 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 = ""; -- cgit v1.2.3