mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 08:48:17 +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
|
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
|
#include <QProcess>
|
||||||
class qc_libmagick : public ConfObj
|
class qc_libmagick : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -595,7 +596,6 @@ public:
|
|||||||
if(!QFile::exists(s+QString("libMagick++.so"))){
|
if(!QFile::exists(s+QString("libMagick++.so"))){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addLib(QString("-L") + s);
|
|
||||||
}else{
|
}else{
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
sl << "/usr/lib/";
|
sl << "/usr/lib/";
|
||||||
@ -609,8 +609,16 @@ public:
|
|||||||
}
|
}
|
||||||
if(!found)
|
if(!found)
|
||||||
return false;
|
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");
|
conf->addDefine("HAVE_MAGICK");
|
||||||
return true;
|
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
|
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
|
#include <QProcess>
|
||||||
class qc_libmagick : public ConfObj
|
class qc_libmagick : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -46,7 +47,6 @@ public:
|
|||||||
if(!QFile::exists(s+QString("libMagick++.so"))){
|
if(!QFile::exists(s+QString("libMagick++.so"))){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addLib(QString("-L") + s);
|
|
||||||
}else{
|
}else{
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
sl << "/usr/lib/";
|
sl << "/usr/lib/";
|
||||||
@ -60,8 +60,16 @@ public:
|
|||||||
}
|
}
|
||||||
if(!found)
|
if(!found)
|
||||||
return false;
|
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");
|
conf->addDefine("HAVE_MAGICK");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ CONFIG += link_pkgconfig
|
|||||||
PKGCONFIG += libtorrent libccext2 libccgnu2
|
PKGCONFIG += libtorrent libccext2 libccgnu2
|
||||||
|
|
||||||
contains(DEFINES, HAVE_MAGICK){
|
contains(DEFINES, HAVE_MAGICK){
|
||||||
PKGCONFIG += ImageMagick++
|
#PKGCONFIG += ImageMagick++
|
||||||
}else{
|
}else{
|
||||||
message(ImageMagick disabled)
|
message(ImageMagick disabled)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user