diff options
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/data/unix/findclasslist.pl | 59 | ||||
-rw-r--r-- | mkspecs/features/default_pre.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/qt.prf | 10 | ||||
-rw-r--r-- | mkspecs/features/qt_module.prf | 23 | ||||
-rw-r--r-- | mkspecs/features/qt_tool.prf | 1 | ||||
-rw-r--r-- | mkspecs/features/winrt/package_manifest.prf | 4 |
6 files changed, 88 insertions, 11 deletions
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl new file mode 100644 index 0000000000..9113b4921c --- /dev/null +++ b/mkspecs/features/data/unix/findclasslist.pl @@ -0,0 +1,59 @@ +#!/usr/bin/env perl +############################################################################# +## +## Copyright (C) 2015 Intel Corporation +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the build configuration tools of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +use strict; +my $syntax = "findclasslist.pl [private header list]\n" . + "Replaces \@CLASSLIST\@ with the classes found in the header files\n"; +$\ = $/; +while (<STDIN>) { + chomp; + unless (/\@CLASSLIST\@/) { + print; + next; + } + + # Replace @CLASSLIST@ with the class list + for my $header (@ARGV) { + open HDR, "<$header" or die("Could not open header $header: $!"); + my $comment = " /* $header */"; + while (my $line = <HDR>) { + # Match a struct or class declaration, but not a forward declaration + $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next; + print $comment if $comment; + printf " *%d%s*;\n", length $1, $1; + $comment = 0; + } + close HDR; + } +} diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index eb3281ea1d..a247b46a72 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -8,6 +8,8 @@ CONFIG = \ testcase_targets import_plugins import_qpa_plugin \ $$CONFIG +contains(QT_CONFIG, c++11):lessThan(QT_COMPILER_STDCXX, 201103): CONFIG += c++11 + !build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") { # # call license checker (but cache result for one day) diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index d416a8955a..d0d6bb27ce 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -155,7 +155,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") !no_qt_rpath:!static:contains(QT_CONFIG, rpath):!contains(QT_CONFIG, static):\ contains(qt_module_deps, core) { - relative_qt_rpath:contains(INSTALLS, target):\ + relative_qt_rpath:!isEmpty(QMAKE_LFLAGS_REL_RPATH):contains(INSTALLS, target):\ isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) { mac { if(equals(TEMPLATE, app):app_bundle)|\ @@ -167,17 +167,11 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") } else { binpath = $$target.path } - rpath = @loader_path } else { - QMAKE_LFLAGS += -Wl,-z,origin binpath = $$target.path - rpath = $ORIGIN } # NOT the /dev property, as INSTALLS use host paths - relpath = $$relative_path($$[QT_INSTALL_LIBS], $$binpath) - !equals(relpath, .): \ - rpath = $$rpath/$$relpath - QMAKE_RPATHDIR += $$rpath + QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$binpath) } else { QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev] } diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 3c0526055c..10911fa6df 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -194,13 +194,30 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { internal_module { verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };" } else { + verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \ + " qt_private_api_tag*;" "@CLASSLIST@" "};" + current = Qt_$$QT_MAJOR_VERSION - verscript_content = "$$current { *; };" - for(i, 0..$$section(VERSION, ., 1, 1)) { + verscript_content += "$$current { *; };" + isEmpty(QT_NAMESPACE): tag_symbol = qt_version_tag + else: tag_symbol = qt_version_tag_$$QT_NAMESPACE + + for(i, 0..$$QT_MINOR_VERSION) { previous = $$current current = Qt_$${QT_MAJOR_VERSION}.$$i - verscript_content += "$$current {} $$previous;" + equals(i, $$QT_MINOR_VERSION): verscript_content += "$$current { $$tag_symbol; } $$previous;" + else: verscript_content += "$$current {} $$previous;" } + + # Add a post-processing step to replace the @CLASSLIST@ + verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $^ > $@ + verscriptprocess.target = $$verscript + verscriptprocess.depends = $${verscript}.in + for(header, SYNCQT.PRIVATE_HEADER_FILES): \ + verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header + QMAKE_EXTRA_TARGETS += verscriptprocess + PRE_TARGETDEPS += $$verscript + verscript = $${verscript}.in } write_file($$verscript, verscript_content)|error("Aborting.") unset(current) diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 1d3e88cbe9..3f0301a292 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -12,6 +12,7 @@ load(qt_app) CONFIG += console +DEFINES *= QT_USE_QSTRINGBUILDER # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build. diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index 0f6f185170..9b4a6672e5 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -125,10 +125,14 @@ # Dependencies are given as a string list. The CRT dependency is added automatically above. # For MSVC2015 the dependencies are added in conjunction with TargetDeviceFamily + # Due to the hard coded dependency on "Windows.Universal" the <Dependencies> tag + # is already inside the MSVC2015 manifest. WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies) !isEmpty(WINRT_MANIFEST.dependencies) { + *-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>" for(DEPENDENCY, WINRT_MANIFEST.dependencies): \ MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />" + *-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>" WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT) } |