1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
/*
-----BEGIN QCMOD-----
name: qcapluginpath
section: project
arg: plugins-path=[path],Path to install to (unix only). Default: qtdir/plugins
-----END QCMOD-----
*/
class qc_qcapluginpath : public ConfObj
{
public:
qc_qcapluginpath(Conf *c) : ConfObj(c) {}
QString name() const { return "qcapluginpath"; }
QString shortname() const { return "qcapluginpath"; }
// no output
QString checkString() const { return QString(); }
bool exec()
{
#ifndef Q_OS_WIN
QString plugins_path = conf->getenv("QC_PLUGINS_PATH");
// default to qtdir
if(plugins_path.isEmpty())
plugins_path = QLibraryInfo::location(QLibraryInfo::PluginsPath);
// install into plugins path
QString str;
str += QString(
"target.path=%1/crypto\n"
"INSTALLS += target\n"
).arg(plugins_path);
conf->addExtra(str);
#endif
return true;
}
};
|