diff --git a/INSTALL b/INSTALL index 355450e0..0ea1fb09 100644 --- a/INSTALL +++ b/INSTALL @@ -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 diff --git a/crypto_win.prf b/crypto_win.prf new file mode 100644 index 00000000..629e18d6 --- /dev/null +++ b/crypto_win.prf @@ -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 +} diff --git a/extra.qcm b/extra.qcm index c24ec08e..572b0e1d 100644 --- a/extra.qcm +++ b/extra.qcm @@ -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; } };