summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/macdeployqt/main.cpp
diff options
context:
space:
mode:
authorGuilherme Steinmann <guidefloripa@gmail.com>2016-06-02 11:36:33 -0300
committerGuilherme Steinmann <guidefloripa@gmail.com>2016-07-27 12:04:34 +0000
commitbda7ece99a8162118a91e9f475c149be39846ecd (patch)
tree48f8e16b00a333a7c1a71f2fdc17bf04e0527e62 /src/macdeployqt/macdeployqt/main.cpp
parentfa17fe6d16891a786dfa457a3c13856ebe74925f (diff)
macdeployqt: add library search path
In earlier versions of OSX, the folder '/usr/lib/' is protected by default and user libraries cannot be copied to that folder. Alternatively, providing an option for alternative library search path would avoid missing libraries during the deploy. The addition of the option '-libpath=<path>' to macdeployqt adds a search path for the dependencies. If a dependency was not found in the provided path, the default folder for searching is used. [ChangeLog][macdeployqt] Added option '-libpath' to search libraries in a custom path. Change-Id: I3afee6aaa3bc25521adecb91ec59d104e13834ed Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/macdeployqt/macdeployqt/main.cpp')
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 9a47e0f2c..8ccecfb9b 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -57,6 +57,7 @@ int main(int argc, char **argv)
qDebug() << " -always-overwrite : Copy files even if the target file exists";
qDebug() << " -codesign=<ident> : Run codesign with the given identity on all executables";
qDebug() << " -appstore-compliant: Skip deployment of components that use private API";
+ qDebug() << " -libpath=<path> : Add the given path to the library search path";
qDebug() << "";
qDebug() << "macdeployqt takes an application bundle as input and makes it";
qDebug() << "self-contained by copying in the Qt frameworks and plugins that";
@@ -90,6 +91,7 @@ int main(int argc, char **argv)
bool useDebugLibs = false;
extern bool runStripEnabled;
extern bool alwaysOwerwriteEnabled;
+ extern QStringList librarySearchPath;
QStringList additionalExecutables;
bool qmldirArgumentUsed = false;
QStringList qmlDirs;
@@ -136,6 +138,13 @@ int main(int argc, char **argv)
LogError() << "Missing qml directory path";
else
qmlDirs << argument.mid(index+1);
+ } else if (argument.startsWith(QByteArray("-libpath"))) {
+ LogDebug() << "Argument found:" << argument;
+ int index = argument.indexOf('=');
+ if (index == -1)
+ LogError() << "Missing library search path";
+ else
+ librarySearchPath << argument.mid(index+1);
} else if (argument == QByteArray("-always-overwrite")) {
LogDebug() << "Argument found:" << argument;
alwaysOwerwriteEnabled = true;