diff --git a/CMakeLists.txt b/CMakeLists.txt index 498527fcb..6ac29cc12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -515,6 +515,22 @@ if(NOT WITH_NAS OR NOT NAS_FOUND) katie_definition(-DQT_NO_NAS) endif() +if(NOT WITH_PNG OR NOT PNG_FOUND) + katie_definition(-DQT_NO_IMAGEFORMAT_PNG) +endif() + +if(NOT WITH_JPEG OR NOT JPEG_FOUND) + katie_definition(-DQT_NO_IMAGEFORMAT_JPEG) +endif() + +if(NOT WITH_MNG OR NOT MNG_FOUND) + katie_definition(-DQT_NO_IMAGEFORMAT_MNG) +endif() + +if(NOT WITH_TIFF OR NOT TIFF_FOUND) + katie_definition(-DQT_NO_IMAGEFORMAT_TIFF) +endif() + # semi-shared include(src/shared/linguist/linguist.cmake) include(src/shared/bootstrap.cmake) diff --git a/cmake/KatieConfig.cmake b/cmake/KatieConfig.cmake index ed079b6c9..c0a926fe7 100644 --- a/cmake/KatieConfig.cmake +++ b/cmake/KatieConfig.cmake @@ -139,7 +139,7 @@ if(NOT KATIE_COMPAT EQUAL FALSE AND NOT KATIE_COMPAT EQUAL OFF) set(QT_QT${uppercomp}_FOUND ${KATIE_${uppercomp}_FOUND}) set(QT_QT${uppercomp}_LIBRARY "${KATIE_${uppercomp}_LIBRARIES}") set(QT_QT${uppercomp}_LIBRARIES "${KATIE_${uppercomp}_LIBRARIES}") - set(QT_QT${uppercomp}_INCLUDE_DIR "@QT_HEADERS_PATH@ ${KATIE_${uppercomp}_INCLUDES}") + set(QT_QT${uppercomp}_INCLUDE_DIR "@QT_HEADERS_PATH@" "${KATIE_${uppercomp}_INCLUDES}") # TODO: component definitions endforeach() diff --git a/src/gui/egl/egl.cmake b/src/gui/egl/egl.cmake index 7ef33c413..a46fb193c 100644 --- a/src/gui/egl/egl.cmake +++ b/src/gui/egl/egl.cmake @@ -32,6 +32,5 @@ else() ${CMAKE_CURRENT_SOURCE_DIR}/egl/qegl_stub.cpp ${CMAKE_CURRENT_SOURCE_DIR}/egl/qeglproperties_stub.cpp ) - add_definitions(-DQT_NO_EGL) endif() diff --git a/src/gui/image/image.cmake b/src/gui/image/image.cmake index 5b2e0054d..bdbe0aa0d 100644 --- a/src/gui/image/image.cmake +++ b/src/gui/image/image.cmake @@ -91,8 +91,6 @@ if(WITH_PNG AND PNG_FOUND) ) include_directories(${PNG_INCLUDE_DIRS}) add_definitions(${PNG_DEFINITIONS}) -else() - add_definitions(-DQT_NO_IMAGEFORMAT_PNG) endif() if(WITH_JPEG AND JPEG_FOUND) @@ -109,8 +107,6 @@ if(WITH_JPEG AND JPEG_FOUND) ${JPEG_LIBRARIES} ) include_directories(${JPEG_INCLUDE_DIR}) -else() - add_definitions(-DQT_NO_IMAGEFORMAT_JPEG) endif() if(WITH_MNG AND MNG_FOUND) @@ -127,8 +123,6 @@ if(WITH_MNG AND MNG_FOUND) ${MNG_LIBRARIES} ) include_directories(${MNG_INCLUDES}) -else() - add_definitions(-DQT_NO_IMAGEFORMAT_MNG) endif() if(WITH_TIFF AND TIFF_FOUND) @@ -145,8 +139,6 @@ if(WITH_TIFF AND TIFF_FOUND) ${TIFF_LIBRARIES} ) include_directories(${TIFF_INCLUDE_DIR}) -else() - add_definitions(-DQT_NO_IMAGEFORMAT_TIFF) endif() if(KATIE_PLATFORM STREQUAL "win32") diff --git a/src/phonon/CMakeLists.txt b/src/phonon/CMakeLists.txt index 18c4de891..66cc54707 100644 --- a/src/phonon/CMakeLists.txt +++ b/src/phonon/CMakeLists.txt @@ -343,7 +343,9 @@ else() katie_generate_map(phonon PHONON_EXPORT) endif() katie_resources(${PHONON_SOURCES} ${PHONON_HEADERS}) -katie_resources(${PHONON_EXPERIMENTAL_HEADERS}) +if(PHONON_EXPERIMENTAL) + katie_resources(${PHONON_EXPERIMENTAL_HEADERS}) +endif() katie_setup_flags() add_library(KtPhonon ${KATIE_TYPE} ${PHONON_SOURCES} ${PHONON_HEADERS} ${PHONON_EXPERIMENTAL_HEADERS}) diff --git a/src/phonon/mediasource.cpp b/src/phonon/mediasource.cpp index 0c9184089..5e009079d 100644 --- a/src/phonon/mediasource.cpp +++ b/src/phonon/mediasource.cpp @@ -422,8 +422,12 @@ QDebug operator <<(QDebug dbg, const Phonon::MediaSource &source) } case MediaSource::CaptureDevice: case MediaSource::AudioVideoCapture: +#ifndef QT_NO_PHONON_EFFECT dbg.nospace() << "AudioVideoCapture(A:" << source.audioCaptureDevice().name() << "/V: " << source.videoCaptureDevice().name() << ")"; +#else + dbg.nospace() << "AudioVideoCapture(A:/V: )"; +#endif break; case MediaSource::Empty: dbg.nospace() << "Empty()"; diff --git a/src/phonon/phonon-vlc/audio/volumefadereffect.h b/src/phonon/phonon-vlc/audio/volumefadereffect.h index e05ed94cd..b0e95f138 100644 --- a/src/phonon/phonon-vlc/audio/volumefadereffect.h +++ b/src/phonon/phonon-vlc/audio/volumefadereffect.h @@ -19,6 +19,8 @@ #ifndef PHONON_VLC_VOLUMEFADEREFFECT_H #define PHONON_VLC_VOLUMEFADEREFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include #include @@ -68,4 +70,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_VOLUMEFADEREFFECT_H diff --git a/src/phonon/phonon-vlc/backend.cpp b/src/phonon/phonon-vlc/backend.cpp index 6fc84595c..306672b82 100644 --- a/src/phonon/phonon-vlc/backend.cpp +++ b/src/phonon/phonon-vlc/backend.cpp @@ -63,7 +63,9 @@ Backend *Backend::self; Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) , m_deviceManager(0) +#ifndef QT_NO_PHONON_EFFECT , m_effectManager(0) +#endif // QT_NO_PHONON_EFFECT { self = this; @@ -135,7 +137,9 @@ Backend::Backend(QObject *parent, const QVariantList &) } m_deviceManager = new DeviceManager(this); +#ifndef QT_NO_PHONON_EFFECT m_effectManager = new EffectManager(this); +#endif // QT_NO_PHONON_EFFECT } Backend::~Backend() @@ -172,8 +176,10 @@ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const case VideoGraphicsObjectClass: return new VideoGraphicsObject(parent); #endif +#ifndef QT_NO_PHONON_EFFECT case EffectClass: return effectManager()->createEffect(args[0].toInt(), parent); +#endif // QT_NO_PHONON_EFFECT case VideoWidgetClass: return new VideoWidget(qobject_cast(parent)); // case VolumeFaderEffectClass: @@ -209,6 +215,7 @@ QList Backend::objectDescriptionIndexes(ObjectDescriptionType type) const return deviceManager()->deviceIds(type); } break; +#ifndef QT_NO_PHONON_EFFECT case Phonon::EffectType: { QList effectList = effectManager()->effects(); for (int eff = 0; eff < effectList.size(); ++eff) { @@ -216,6 +223,7 @@ QList Backend::objectDescriptionIndexes(ObjectDescriptionType type) const } } break; +#endif // QT_NO_PHONON_EFFECT case Phonon::SubtitleType: { list << GlobalSubtitles::instance()->globalIndexes(); } @@ -243,6 +251,7 @@ QHash Backend::objectDescriptionProperties(ObjectDescripti return deviceManager()->deviceProperties(index); } break; +#ifndef QT_NO_PHONON_EFFECT case Phonon::EffectType: { const QList effectList = effectManager()->effects(); if (index >= 0 && index <= effectList.size()) { @@ -255,6 +264,7 @@ QHash Backend::objectDescriptionProperties(ObjectDescripti } } break; +#endif // QT_NO_PHONON_EFFECT case Phonon::SubtitleType: { const SubtitleDescription description = GlobalSubtitles::instance()->fromIndex(index); ret.insert("name", description.name()); @@ -293,11 +303,13 @@ bool Backend::connectNodes(QObject *source, QObject *sink) return true; } +#ifndef QT_NO_PHONON_EFFECT VolumeFaderEffect *effect = qobject_cast(source); if (effect) { sinkNode->connectToMediaObject(effect->mediaObject()); return true; } +#endif // QT_NO_PHONON_EFFECT } warning() << "Linking" << source->metaObject()->className() << "to" << sink->metaObject()->className() << "failed"; @@ -316,11 +328,13 @@ bool Backend::disconnectNodes(QObject *source, QObject *sink) return true; } +#ifndef QT_NO_PHONON_EFFECT VolumeFaderEffect *const effect = qobject_cast(source); if (effect) { sinkNode->disconnectFromMediaObject(effect->mediaObject()); return true; } +#endif // QT_NO_PHONON_EFFECT } return false; @@ -339,10 +353,12 @@ DeviceManager *Backend::deviceManager() const return m_deviceManager; } +#ifndef QT_NO_PHONON_EFFECT EffectManager *Backend::effectManager() const { return m_effectManager; } +#endif // QT_NO_PHONON_EFFECT } // namespace VLC } // namespace Phonon diff --git a/src/phonon/phonon-vlc/backend.h b/src/phonon/phonon-vlc/backend.h index c4403d649..bdd32a352 100644 --- a/src/phonon/phonon-vlc/backend.h +++ b/src/phonon/phonon-vlc/backend.h @@ -34,7 +34,9 @@ namespace Phonon namespace VLC { class DeviceManager; +#ifndef QT_NO_PHONON_EFFECT class EffectManager; +#endif // QT_NO_PHONON_EFFECT /** \brief Backend class for Phonon-VLC. * @@ -75,8 +77,10 @@ public: /// \return The device manager that is associated with this backend object DeviceManager *deviceManager() const; +#ifndef QT_NO_PHONON_EFFECT /// \return The effect manager that is associated with this backend object. EffectManager *effectManager() const; +#endif // QT_NO_PHONON_EFFECT /** * Creates a backend object of the desired class and with the desired parent. Extra arguments can be provided. @@ -148,7 +152,9 @@ private: mutable QStringList m_supportedMimeTypes; DeviceManager *m_deviceManager; +#ifndef QT_NO_PHONON_EFFECT EffectManager *m_effectManager; +#endif // QT_NO_PHONON_EFFECT }; } // namespace VLC diff --git a/src/phonon/phonon-vlc/effect.cpp b/src/phonon/phonon-vlc/effect.cpp index 69393654f..620133d58 100644 --- a/src/phonon/phonon-vlc/effect.cpp +++ b/src/phonon/phonon-vlc/effect.cpp @@ -18,6 +18,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include "effect.h" #include "effectmanager.h" @@ -225,3 +227,5 @@ void Effect::setParameterValue(const EffectParameter ¶m, const QVariant &new } // Namespace Phonon::VLC #include "phonon-vlc/moc_effect.h" + +#endif // QT_NO_PHONON_EFFECT \ No newline at end of file diff --git a/src/phonon/phonon-vlc/effect.h b/src/phonon/phonon-vlc/effect.h index 74f3f0270..60ff37680 100644 --- a/src/phonon/phonon-vlc/effect.h +++ b/src/phonon/phonon-vlc/effect.h @@ -21,6 +21,8 @@ #ifndef PHONON_VLC_EFFECT_H #define PHONON_VLC_EFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include "sinknode.h" #include "effectmanager.h" @@ -77,4 +79,6 @@ private: } } // Namespace Phonon::VLC +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_EFFECT_H diff --git a/src/phonon/phonon-vlc/effectmanager.cpp b/src/phonon/phonon-vlc/effectmanager.cpp index 94293bf1d..abea19ac8 100644 --- a/src/phonon/phonon-vlc/effectmanager.cpp +++ b/src/phonon/phonon-vlc/effectmanager.cpp @@ -19,6 +19,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include "effectmanager.h" #include @@ -133,4 +135,7 @@ void EffectManager::updateEffects() } // namespace VLC } // namespace Phonon + #include "phonon-vlc/moc_effectmanager.h" + +#endif // QT_NO_PHONON_EFFECT diff --git a/src/phonon/phonon-vlc/effectmanager.h b/src/phonon/phonon-vlc/effectmanager.h index 5293cd433..60f15e6d6 100644 --- a/src/phonon/phonon-vlc/effectmanager.h +++ b/src/phonon/phonon-vlc/effectmanager.h @@ -22,6 +22,8 @@ #ifndef Phonon_VLC_EFFECTMANAGER_H #define Phonon_VLC_EFFECTMANAGER_H +#ifndef QT_NO_PHONON_EFFECT + #include namespace Phonon { @@ -116,4 +118,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // Phonon_VLC_EFFECTMANAGER_H diff --git a/src/phonon/phonon-vlc/equalizereffect.cpp b/src/phonon/phonon-vlc/equalizereffect.cpp index dc68e724e..3f562f491 100644 --- a/src/phonon/phonon-vlc/equalizereffect.cpp +++ b/src/phonon/phonon-vlc/equalizereffect.cpp @@ -15,6 +15,8 @@ License along with this library. If not, see . */ +#ifndef QT_NO_PHONON_EFFECT + #include #if (LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 0, 0)) @@ -84,3 +86,5 @@ void EqualizerEffect::handleConnectToMediaObject(MediaObject *mediaObject) #include "phonon-vlc/moc_equalizereffect.h" #endif // LIBVLC_VERSION + +#endif // QT_NO_PHONON_EFFECT \ No newline at end of file diff --git a/src/phonon/phonon-vlc/equalizereffect.h b/src/phonon/phonon-vlc/equalizereffect.h index a1b050dec..b6bd37b6e 100644 --- a/src/phonon/phonon-vlc/equalizereffect.h +++ b/src/phonon/phonon-vlc/equalizereffect.h @@ -18,6 +18,8 @@ #ifndef PHONON_VLC_EQUALIZEREFFECT_H #define PHONON_VLC_EQUALIZEREFFECT_H +#ifndef QT_NO_PHONON_EFFECT + #include #include @@ -52,4 +54,6 @@ private: } // namespace VLC } // namespace Phonon +#endif // QT_NO_PHONON_EFFECT + #endif // PHONON_VLC_EQUALIZEREFFECT_H