From 432efae0a9841be849c78f9ef24ea48296f3c19c Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sat, 7 Feb 2015 17:31:37 -0500 Subject: [PATCH] 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 --- doc/index.docbook | 16 +++++++++++++++- modules/ksb/BuildSystem/QMake.pm | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/index.docbook b/doc/index.docbook index 2395886..14a9677 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -2,7 +2,7 @@ + Copyright (c) 2005-2008, 2010-2015 Michael Pyne Copyright (c) 2005 Carlos Leonhard Woelz Copyright (c) 2009 Burkhard Lück @@ -2337,6 +2337,20 @@ deleted or not. The default value is true. + +qmake-options +Module setting overrides global + +Any options specified here are passed to the +qmake command, for modules that use the +qmake build system. For instance, you can use the +PREFIX=/path/to/qt option to qmake to override where it +installs the module. + +This option was added to &kdesrc-build; 1.16. + + + qtdir Module setting overrides global diff --git a/modules/ksb/BuildSystem/QMake.pm b/modules/ksb/BuildSystem/QMake.pm index b4508db..5d28cea 100644 --- a/modules/ksb/BuildSystem/QMake.pm +++ b/modules/ksb/BuildSystem/QMake.pm @@ -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;