Maemo: Deduce correct target file name for library template.

This commit is contained in:
ck
2010-05-05 09:12:25 +02:00
parent ec5661c1fb
commit 26e9569a6c
3 changed files with 22 additions and 6 deletions

View File

@@ -33,6 +33,8 @@
#include "maemotoolchain.h"
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4target.h>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
@@ -176,8 +178,14 @@ void MaemoPackageContents::fromMap(const QVariantMap &map)
QString MaemoPackageContents::remoteExecutableFilePath() const
{
if (m_remoteExecutableFilePath.isEmpty()) {
m_remoteExecutableFilePath = QLatin1String("/usr/local/bin/")
+ m_packageStep->executableFileName();
const Qt4ProjectType projectType
= m_packageStep->qt4BuildConfiguration()->qt4Target()->qt4Project()
->rootProjectNode()->projectType();
const QString remoteDir = projectType == LibraryTemplate
? QLatin1String("/usr/local/lib/")
: QLatin1String("/usr/local/bin/");
m_remoteExecutableFilePath
= remoteDir + m_packageStep->executableFileName();
}
return m_remoteExecutableFilePath;
}