qmake: Add qmake-options to pass options to qmake.

Obviously this only applies to the few modules that utilize the qmake
build system.

BUG:342416
FIXED-IN:1.16
wilder
Michael Pyne 11 years ago
parent f4011bb76b
commit 432efae0a9
  1. 16
      doc/index.docbook
  2. 3
      modules/ksb/BuildSystem/QMake.pm

@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!--
Documentation for kdesrc-build.
Copyright (c) 2005-2008, 2010-2014 Michael Pyne <mpyne@kde.org>
Copyright (c) 2005-2008, 2010-2015 Michael Pyne <mpyne@kde.org>
Copyright (c) 2005 Carlos Leonhard Woelz <carloswoelz@imap-mail.com>
Copyright (c) 2009 Burkhard Lück <lueck@hube-lueck.de>
@ -2337,6 +2337,20 @@ deleted or not. The default value is <replaceable>true</replaceable>.</para>
</entry>
</row>
<row id="conf-qmake-options">
<entry>qmake-options</entry>
<entry>Module setting overrides global</entry>
<entry><para>Any options specified here are passed to the
<command>qmake</command> command, for modules that use the
<symbol>qmake</symbol> build system. For instance, you can use the
<userinput>PREFIX=/path/to/qt</userinput> option to qmake to override where it
installs the module.
</para>
<para>This option was added to &kdesrc-build; 1.16.</para>
</entry>
</row>
<row id="conf-qtdir">
<entry>qtdir</entry>
<entry>Module setting overrides global</entry>

@ -44,6 +44,7 @@ sub configureInternal
my $module = $self->module();
my $builddir = $module->fullpath('build');
my $sourcedir = $module->fullpath('source');
my @qmakeOpts = split(' ', $module->getOption('qmake-options'));
my @projectFiles = glob("$sourcedir/*.pro");
if (!@projectFiles || !$projectFiles[0]) {
@ -59,7 +60,7 @@ sub configureInternal
my $qmake = absPathToQMake();
return 0 unless $qmake;
return log_command($module, 'qmake', [ $qmake, $projectFiles[0] ]) == 0;
return log_command($module, 'qmake', [ $qmake, @qmakeOpts, $projectFiles[0] ]) == 0;
}
1;

Loading…
Cancel
Save