diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
index 93b140cc7542c9f00a31fb3bb4421967c4fe0052..9d0f4a20f96abf7b89a800eac289450ef1e159fc 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
@@ -650,7 +650,7 @@ void MaemoDeployStep::installToSysroot()
                 + d.remoteDir + sep + QFileInfo(d.localFilePath).fileName();
             sysRootDir.mkpath(d.remoteDir.mid(1));
             QFile::remove(targetFilePath);
-            if (!QFile::copy(d.localFilePath, targetFilePath)) {
+            if (!MaemoGlobal::copyRecursively(d.localFilePath, targetFilePath)) {
                 writeOutput(tr("Sysroot installation failed: "
                     "Could not copy '%1' to '%2'. Continuing anyway.")
                     .arg(QDir::toNativeSeparators(d.localFilePath),
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
index b2b0e4446448a18dd198168fc22e1e0bab6f9094..cc89d2b72c334fbbdd699939a3099bfc86f5f2b5 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
@@ -254,6 +254,43 @@ bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error)
     return true;
 }
 
+bool MaemoGlobal::copyRecursively(const QString &srcFilePath,
+    const QString &tgtFilePath, QString *error)
+{
+    QFileInfo srcFileInfo(srcFilePath);
+    if (srcFileInfo.isDir()) {
+        QDir targetDir(tgtFilePath);
+        targetDir.cdUp();
+        if (!targetDir.mkdir(QFileInfo(tgtFilePath).fileName())) {
+            if (error) {
+                *error = tr("Failed to create directory '%1'.")
+                    .arg(QDir::toNativeSeparators(tgtFilePath));
+                return false;
+            }
+        }
+        QDir sourceDir(srcFilePath);
+        QStringList fileNames = sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
+        foreach (const QString &fileName, fileNames) {
+            const QString newSrcFilePath
+                = srcFilePath + QLatin1Char('/') + fileName;
+            const QString newTgtFilePath
+                = tgtFilePath + QLatin1Char('/') + fileName;
+            if (!copyRecursively(newSrcFilePath, newTgtFilePath))
+                return false;
+        }
+    } else {
+        if (!QFile::copy(srcFilePath, tgtFilePath)) {
+            if (error) {
+                *error = tr("Could not copy file '%1' to '%2'.")
+                    .arg(QDir::toNativeSeparators(srcFilePath),
+                         QDir::toNativeSeparators(tgtFilePath));
+            }
+            return false;
+        }
+    }
+    return true;
+}
+
 bool MaemoGlobal::callMad(QProcess &proc, const QStringList &args,
     const QtVersion *qtVersion, bool useTarget)
 {
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
index c12beefd7b4d573c913e95435c5978a259fedc35..9b662d3cdcacfd965744d6334580fc7d0fa3b0c1 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
@@ -107,6 +107,8 @@ public:
     static PackagingSystem packagingSystem(MaemoVersion maemoVersion);
 
     static bool removeRecursively(const QString &filePath, QString &error);
+    static bool copyRecursively(const QString &srcFilePath,
+        const QString &tgtFilePath, QString *error = 0);
 
     template<class T> static T *buildStep(const ProjectExplorer::DeployConfiguration *dc)
     {