mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
- Improved ImageMagick detection and it should be able to build without it too now
This commit is contained in:
parent
99268bfc06
commit
2ddcaf008b
5 changed files with 150 additions and 80 deletions
|
@ -41,7 +41,7 @@
|
|||
#include "misc.h"
|
||||
#include "downloadThread.h"
|
||||
|
||||
#ifndef NO_MAGICK
|
||||
#ifdef HAVE_MAGICK
|
||||
#include <Magick++.h>
|
||||
using namespace Magick;
|
||||
#endif
|
||||
|
@ -389,7 +389,7 @@ class RssManager : public QObject{
|
|||
if(url.endsWith("favicon.ico")){
|
||||
// Icon downloaded
|
||||
QImage fileIcon;
|
||||
#ifndef NO_MAGICK
|
||||
#ifdef HAVE_MAGICK
|
||||
try{
|
||||
QFile::copy(path, path+".ico");
|
||||
Image image(QDir::cleanPath(path+".ico").toUtf8().data());
|
||||
|
|
53
src/src.pro
53
src/src.pro
|
@ -27,29 +27,6 @@ contains(DEBUG_MODE, 0){
|
|||
message(Release build!)
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += -fwrapv -O2
|
||||
QMAKE_CXXFLAGS_DEBUG += -fwrapv -O1
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libtorrent libccext2 libccgnu2 ImageMagick++
|
||||
QT += network xml
|
||||
|
||||
DEFINES += QT_NO_CAST_TO_ASCII
|
||||
#QT_NO_CAST_FROM_ASCII
|
||||
|
||||
contains(DEBUG_MODE, 0){
|
||||
contains(QT_VERSION, 4.2.0) {
|
||||
message(Qt 4.2.0 detected : enabling debug output because of a bug in this version of Qt)
|
||||
}else{
|
||||
contains(QT_VERSION, 4.2.1) {
|
||||
message(Qt 4.2.1 detected : enabling debug output because of a bug in this version of Qt)
|
||||
}else{
|
||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
}
|
||||
CONFIG += release
|
||||
}
|
||||
|
||||
# Install
|
||||
|
||||
!win32 {
|
||||
|
@ -95,6 +72,36 @@ contains(DEBUG_MODE, 0){
|
|||
INSTALLS += icon16 icon22 icon24 icon32 icon36 icon48 icon64 icon72 icon96 icon128 icon192
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += -fwrapv -O2
|
||||
QMAKE_CXXFLAGS_DEBUG += -fwrapv -O1
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libtorrent libccext2 libccgnu2
|
||||
|
||||
contains(DEFINES, HAVE_MAGICK){
|
||||
PKGCONFIG += ImageMagick++
|
||||
}else{
|
||||
message(ImageMagick disabled)
|
||||
}
|
||||
|
||||
QT += network xml
|
||||
|
||||
DEFINES += QT_NO_CAST_TO_ASCII
|
||||
#QT_NO_CAST_FROM_ASCII
|
||||
|
||||
contains(DEBUG_MODE, 0){
|
||||
contains(QT_VERSION, 4.2.0) {
|
||||
message(Qt 4.2.0 detected : enabling debug output because of a bug in this version of Qt)
|
||||
}else{
|
||||
contains(QT_VERSION, 4.2.1) {
|
||||
message(Qt 4.2.1 detected : enabling debug output because of a bug in this version of Qt)
|
||||
}else{
|
||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
}
|
||||
CONFIG += release
|
||||
}
|
||||
|
||||
# Windows
|
||||
win32 {
|
||||
LIBS += -ltorrent -lccext2 -lccgnu2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue