prf file support

svn path=/trunk/kdesupport/qca/; revision=441824
This commit is contained in:
Justin Karneges 2005-08-01 03:16:36 +00:00
parent 20fd5eab8b
commit a4e58108b3
3 changed files with 40 additions and 2 deletions

View File

@ -12,6 +12,9 @@ For Windows:
qmake qca.pro
nmake (or make)
edit crypto_win.prf
copy crypto_win.prf qtdir\mkspecs\features\crypto.prf
Please report problems to:
delta-affinix.com@lists.affinix.com

9
crypto_win.prf Normal file
View File

@ -0,0 +1,9 @@
CONFIG *= qt
windows:{
# change this to the QCA install location
QCA_PREFIX = /local
INCLUDEPATH = $$QCA_PREFIX/include/QtCrypto
LIBS += -L$$QCA_PREFIX/lib
LIBS += -lqca
}

View File

@ -17,7 +17,31 @@ public:
bool exec()
{
QString prefix = conf->getenv("PREFIX");
QString str = QString(
QString str;
QFile f;
// write qmake-feature file
str = QString(
"CONFIG *= qt\n"
"INCLUDEPATH = %1/include/QtCrypto\n").arg(prefix);
str += QString(
"LIBS += -L%1/lib -lqca\n").arg(prefix);
f.setFileName("crypto.prf");
if(f.open(QFile::WriteOnly | QFile::Truncate))
f.write(str.toLatin1());
f.close();
str = QString(
"prffiles.path = %1/mkspecs/features\n"
"prffiles.files = qca.prf\n"
"INSTALLS += prffiles\n"
).arg(QLibraryInfo::location(QLibraryInfo::DataPath));
conf->addExtra(str);
// write pkg-config file
str = QString(
"prefix=%1\n"
"exec_prefix=${prefix}\n"
"libdir=${prefix}/lib\n"
@ -32,9 +56,11 @@ public:
"\n"
).arg(prefix);
QFile f("qca.pc");
f.setFileName("qca.pc");
if(f.open(QFile::WriteOnly | QFile::Truncate))
f.write(str.toLatin1());
f.close();
return true;
}
};