diff options
author | David Robillard <d@drobilla.net> | 2020-11-25 16:50:59 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-25 16:50:59 +0100 |
commit | efb12030a1179dfd567f6c1b737a49291eebe19d (patch) | |
tree | 425f2054fd9292f0831c04e3c8416a6d92657ebc /Tools/qt5.py | |
parent | d19992202543ebb810609c074f754b5ec48c0fd7 (diff) | |
download | autowaf-efb12030a1179dfd567f6c1b737a49291eebe19d.tar.gz autowaf-efb12030a1179dfd567f6c1b737a49291eebe19d.tar.bz2 autowaf-efb12030a1179dfd567f6c1b737a49291eebe19d.zip |
Upgrade to waf 2.0.21
Diffstat (limited to 'Tools/qt5.py')
-rw-r--r-- | Tools/qt5.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Tools/qt5.py b/Tools/qt5.py index 99e021b..cff2028 100644 --- a/Tools/qt5.py +++ b/Tools/qt5.py @@ -57,7 +57,23 @@ A few options (--qt{dir,bin,...}) and environment variables (QT5_{ROOT,DIR,MOC,UIC,XCOMPILE}) allow finer tuning of the tool, tool path selection, etc; please read the source for more info. -The detection uses pkg-config on Linux by default. To force static library detection use: +The detection uses pkg-config on Linux by default. The list of +libraries to be requested to pkg-config is formulated by scanning +in the QTLIBS directory (that can be passed via --qtlibs or by +setting the environment variable QT5_LIBDIR otherwise is derived +by querying qmake for QT_INSTALL_LIBS directory) for shared/static +libraries present. +Alternatively the list of libraries to be requested via pkg-config +can be set using the qt5_vars attribute, ie: + + conf.qt5_vars = ['Qt5Core', 'Qt5Gui', 'Qt5Widgets', 'Qt5Test']; + +This can speed up configuration phase if needed libraries are +known beforehand, can improve detection on systems with a +sparse QT5 libraries installation (ie. NIX) and can improve +detection of some header-only Qt modules (ie. Qt5UiPlugin). + +To force static library detection use: QT5_XCOMPILE=1 QT5_FORCE_STATIC=1 waf configure """ @@ -466,6 +482,9 @@ def configure(self): The detection uses the program ``pkg-config`` through :py:func:`waflib.Tools.config_c.check_cfg` """ + if 'COMPILER_CXX' not in self.env: + self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') + self.find_qt5_binaries() self.set_qt5_libs_dir() self.set_qt5_libs_to_check() @@ -478,9 +497,6 @@ def configure(self): if not has_xml: Logs.error('No xml.sax support was found, rcc dependencies will be incomplete!') - if 'COMPILER_CXX' not in self.env: - self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') - # Qt5 may be compiled with '-reduce-relocations' which requires dependent programs to have -fPIE or -fPIC? frag = '#include <QMap>\nint main(int argc, char **argv) {QMap<int,int> m;return m.keys().size();}\n' uses = 'QT5CORE' @@ -637,7 +653,7 @@ def set_qt5_libs_dir(self): except Errors.WafError: qtdir = self.cmd_and_log(env.QMAKE + ['-query', 'QT_INSTALL_PREFIX']).strip() qtlibs = os.path.join(qtdir, 'lib') - self.msg('Found the Qt5 libraries in', qtlibs) + self.msg('Found the Qt5 library path', qtlibs) env.QTLIBS = qtlibs @conf |