mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 00:37:58 +00:00
- Use "Magick++-config --libs" to get linking libs instead of pkg-config because some distros (like Mandriva) do not provide ImageMagick++.pc
This commit is contained in:
parent
17b8f76dda
commit
6918aba90c
12
configure
vendored
12
configure
vendored
@ -554,6 +554,7 @@ arg: with-libmagick-inc=[path], Path to libmagick++ include files
|
||||
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libmagick : public ConfObj
|
||||
{
|
||||
public:
|
||||
@ -595,7 +596,6 @@ public:
|
||||
if(!QFile::exists(s+QString("libMagick++.so"))){
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
@ -609,8 +609,16 @@ public:
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QProcess magickConfig;
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ arg: with-libmagick-inc=[path], Path to libmagick++ include files
|
||||
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libmagick : public ConfObj
|
||||
{
|
||||
public:
|
||||
@ -46,7 +47,6 @@ public:
|
||||
if(!QFile::exists(s+QString("libMagick++.so"))){
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
@ -60,8 +60,16 @@ public:
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QProcess magickConfig;
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libtorrent libccext2 libccgnu2
|
||||
|
||||
contains(DEFINES, HAVE_MAGICK){
|
||||
PKGCONFIG += ImageMagick++
|
||||
#PKGCONFIG += ImageMagick++
|
||||
}else{
|
||||
message(ImageMagick disabled)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user