diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm --- a/modules/ksb/Application.pm +++ b/modules/ksb/Application.pm @@ -2442,7 +2442,8 @@ if (!$programPath) { # Don't complain about Qt if we're building it... if ($prog eq 'qmake' && ( - grep { $_->buildSystemType() eq 'Qt' } (@buildModules)) || + grep { $_->buildSystemType() eq 'Qt' || + $_->buildSystemType() eq 'Qt5' } (@buildModules)) || pretending() ) { diff --git a/modules/ksb/Module.pm b/modules/ksb/Module.pm --- a/modules/ksb/Module.pm +++ b/modules/ksb/Module.pm @@ -642,11 +642,24 @@ my $self = assert_isa(shift, 'ksb::Module'); my $ctx = $self->buildContext(); my $kdedir = $self->getOption('kdedir'); + my $qtdir = $self->getOption('qtdir'); my $prefix = $self->installationPath(); # Add global set-envs and context $self->buildContext()->applyUserEnvironment(); + # Avoid moving /usr up in env vars + if ($qtdir ne '/usr') { + my @qt_pkg_config_dirs = ("$qtdir/lib/pkgconfig"); + $ctx->prependEnvironmentValue('PKG_CONFIG_PATH', @qt_pkg_config_dirs); + + my @qt_ld_dirs = ("$qtdir/lib"); + $ctx->prependEnvironmentValue('LD_LIBRARY_PATH', @qt_ld_dirs); + + my @qt_path = ("$qtdir/bin"); + $ctx->prependEnvironmentValue('PATH', @qt_path); + } + # Avoid moving /usr up in env vars if ($kdedir ne '/usr') { my @pkg_config_dirs = ("$kdedir/lib/pkgconfig");