QNX: Use the QNX_CONFIGURATION_EXCLUSIVE envvar in QnxToolchain

QNX_CONFIGURATION_EXCLUSIVE is responsible for license checking
failure when qcc was probed for capabilities.

Change-Id: Ib7efa9eba3b2f3cb131899aa6cb75e632446342c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2019-09-26 19:04:38 +02:00
parent 9caca851f4
commit 642be63991
2 changed files with 10 additions and 5 deletions

View File

@@ -74,9 +74,12 @@ static Abis detectTargetAbis(const FilePath &sdpPath)
static void setQnxEnvironment(Environment &env, const EnvironmentItems &qnxEnv) static void setQnxEnvironment(Environment &env, const EnvironmentItems &qnxEnv)
{ {
// We only need to set QNX_HOST and QNX_TARGET needed when running qcc // We only need to set QNX_HOST, QNX_TARGET, and QNX_CONFIGURATION_EXCLUSIVE
// needed when running qcc
foreach (const EnvironmentItem &item, qnxEnv) { foreach (const EnvironmentItem &item, qnxEnv) {
if (item.name == QLatin1String("QNX_HOST") || item.name == QLatin1String("QNX_TARGET")) if (item.name == QLatin1String("QNX_HOST") ||
item.name == QLatin1String("QNX_TARGET") ||
item.name == QLatin1String("QNX_CONFIGURATION_EXCLUSIVE"))
env.set(item.name, item.value); env.set(item.name, item.value);
} }
} }
@@ -113,7 +116,9 @@ std::unique_ptr<ToolChainConfigWidget> QnxToolChain::createConfigurationWidget()
void QnxToolChain::addToEnvironment(Environment &env) const void QnxToolChain::addToEnvironment(Environment &env) const
{ {
if (env.expandedValueForKey("QNX_HOST").isEmpty() || env.expandedValueForKey("QNX_TARGET").isEmpty()) if (env.expandedValueForKey("QNX_HOST").isEmpty() ||
env.expandedValueForKey("QNX_TARGET").isEmpty() ||
env.expandedValueForKey("QNX_CONFIGURATION_EXCLUSIVE").isEmpty())
setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_sdpPath)); setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_sdpPath));
GccToolChain::addToEnvironment(env); GccToolChain::addToEnvironment(env);

View File

@@ -46,8 +46,8 @@ using namespace Qnx::Internal;
namespace { namespace {
const char *EVAL_ENV_VARS[] = { const char *EVAL_ENV_VARS[] = {
"QNX_TARGET", "QNX_HOST", "QNX_CONFIGURATION", "MAKEFLAGS", "LD_LIBRARY_PATH", "QNX_TARGET", "QNX_HOST", "QNX_CONFIGURATION", "QNX_CONFIGURATION_EXCLUSIVE",
"PATH", "QDE", "CPUVARDIR", "PYTHONPATH" "MAKEFLAGS", "LD_LIBRARY_PATH", "PATH", "QDE", "CPUVARDIR", "PYTHONPATH"
}; };
} }