project(kolourpaint)
-find_package(QImageBlitz REQUIRED)
+find_package(QImageBlitz)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/widgets/toolbars/options
${KDE4_INCLUDES}
- ${QIMAGEBLITZ_INCLUDES}
)
add_subdirectory( pics )
set(kolourpaint_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectBalanceCommand.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectClearCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectCommandBase.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectEmbossCommand.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectFlattenCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectGrayscaleCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectHSVCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectInvertCommand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/generic/widgets/kpResizeSignallingLabel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/generic/widgets/kpSubWindow.cpp
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectBalance.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectBlurSharpen.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectEmboss.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectFlatten.cpp
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectGrayscale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectHSV.cpp
${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectInvert.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityHolder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectBalanceWidget.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectHSVWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectInvertWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/kpUrlFormatter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/kpColorCollection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lgpl/generic/widgets/kpColorCellsBase.cpp
- )
+)
+if(QIMAGEBLITZ_FOUND)
+ set(kolourpaint_SRCS
+ ${kolourpaint_SRCS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectEmbossCommand.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/commands/imagelib/effects/kpEffectFlattenCommand.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectBlurSharpen.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectEmboss.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/imagelib/effects/kpEffectFlatten.cpp
+ )
+ include_directories(${QIMAGEBLITZ_INCLUDES})
+ add_definitions(-DHAVE_QIMAGEBLITZ)
+endif()
#
# LGPL Library
add_executable(kolourpaint ${kolourpaint_SRCS})
-target_link_libraries(kolourpaint ${KDE4_KIO_LIBS} ${KDE4_KPRINTUTILS_LIBS}
-${QIMAGEBLITZ_LIBRARIES} kolourpaint_lgpl)
+target_link_libraries(kolourpaint ${KDE4_KIO_LIBS} ${KDE4_KPRINTUTILS_LIBS} kolourpaint_lgpl)
+if(QIMAGEBLITZ_FOUND)
+ target_link_libraries(kolourpaint ${QIMAGEBLITZ_LIBRARIES})
+endif()
install(TARGETS kolourpaint ${INSTALL_TARGETS_DEFAULT_ARGS})
// TODO: What about translations?
// sync: order in selectEffect().
m_effectsComboBox->addItem (i18n ("Balance"));
- m_effectsComboBox->addItem (i18n ("Emboss"));
- m_effectsComboBox->addItem (i18n ("Flatten"));
m_effectsComboBox->addItem (i18n ("Histogram Equalizer"));
m_effectsComboBox->addItem (i18n ("Hue, Saturation, Value"));
m_effectsComboBox->addItem (i18n ("Invert"));
m_effectsComboBox->addItem (i18n ("Reduce Colors"));
+#ifdef HAVE_QIMAGEBLITZ
m_effectsComboBox->addItem (i18n ("Soften & Sharpen"));
+ m_effectsComboBox->addItem (i18n ("Emboss"));
+ m_effectsComboBox->addItem (i18n ("Flatten"));
+#endif
label->setBuddy (m_effectsComboBox);
effectContainer->setStretchFactor (m_effectsComboBox, 1);
break;
case 1:
- CREATE_EFFECT_WIDGET (kpEffectEmbossWidget);
+ CREATE_EFFECT_WIDGET (kpEffectToneEnhanceWidget);
break;
case 2:
- CREATE_EFFECT_WIDGET (kpEffectFlattenWidget);
+ CREATE_EFFECT_WIDGET (kpEffectHSVWidget);
break;
-
+
case 3:
- CREATE_EFFECT_WIDGET (kpEffectToneEnhanceWidget);
+ CREATE_EFFECT_WIDGET (kpEffectInvertWidget);
break;
case 4:
- CREATE_EFFECT_WIDGET (kpEffectHSVWidget);
+ CREATE_EFFECT_WIDGET (kpEffectReduceColorsWidget);
break;
+#ifdef HAVE_QIMAGEBLITZ
case 5:
- CREATE_EFFECT_WIDGET (kpEffectInvertWidget);
+ CREATE_EFFECT_WIDGET (kpEffectEmbossWidget);
break;
case 6:
- CREATE_EFFECT_WIDGET (kpEffectReduceColorsWidget);
+ CREATE_EFFECT_WIDGET (kpEffectFlattenWidget);
break;
case 7:
CREATE_EFFECT_WIDGET (kpEffectBlurSharpenWidget);
break;
+#endif
}
#undef CREATE_EFFECT_WIDGET