Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 09b390cf authored by Boudewijn Rempt's avatar Boudewijn Rempt

abort abortive attempt to make pigment optional

svn path=/trunk/koffice/; revision=991139
parent ba9f200e
......@@ -8,8 +8,6 @@ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
#############
############
option(BUILD_pigment "Enable the compilation of the pigment CMS libray (needed by krita and karbon)" ON) # we can't use the one coming from macro_optional_add_subdirectory since the option is created after the checks
######################
#######################
## Constants defines ##
......@@ -62,39 +60,20 @@ endif (APPLE)
#################################
################################
# NO_PIGMENT disabled everything that uses pigment in the crudest matter possible
if (NOT BUILD_pigment)
add_definitions(-DNO_PIGMENT)
set (FULL_PIGMENT FALSE)
set (SMALL_PIGMENT FALSE)
else (NOT BUILD_pigment)
include_directories(${CMAKE_SOURCE_DIR}/libs/pigment)
# macro_optional_find_package(LCMS)
find_package(LCMS REQUIRED)
set(REQUIRED_LCMS_VERSION 118)
if(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
# FULL_PIGMENT is the most desirable state, we can compile Krita!
set(HAVE_REQUIRED_LCMS_VERSION TRUE)
set(FULL_PIGMENT TRUE)
set(SMALL_PIGMENT FALSE)
add_definitions(-DFULL_PIGMENT)
else(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
message( FATAL_ERROR "Old LCMS version found, upgrade to 1.18.")
set(HAVE_REQUIRED_LCMS_VERSION FALSE)
set(SMALL_PIGMENT TRUE)
set(FULL_PIGMENT FALSE)
endif(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
macro_log_feature(HAVE_REQUIRED_LCMS_VERSION "LittleCMS" "Color management engine" "http://www.littlecms.com" FALSE "1.18" "Required by for color management and for Krita")
endif (NOT BUILD_pigment)
# SMALL_PIGMENT provides just the classed needed to compile koffice libs, but not not Krita.
if (SMALL_PIGMENT)
add_definitions(-DSMALL_PIGMENT)
endif(SMALL_PIGMENT)
include_directories(${CMAKE_SOURCE_DIR}/libs/pigment)
find_package(LCMS REQUIRED)
set(REQUIRED_LCMS_VERSION 118)
if(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
# FULL_PIGMENT is the most desirable state, we can compile Krita!
set(HAVE_REQUIRED_LCMS_VERSION TRUE)
set(BUILD_PIGMENT TRUE)
else(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
message( FATAL_ERROR "Old LCMS version found, upgrade to 1.18.")
set(BUILD_PIGMENT FALSE)
endif(LCMS_FOUND AND NOT LCMS_VERSION LESS ${REQUIRED_LCMS_VERSION})
macro_log_feature(HAVE_REQUIRED_LCMS_VERSION "LittleCMS" "Color management engine" "http://www.littlecms.com" FALSE "1.18" "Required by for color management and for Krita")
###########################
############################
......@@ -306,9 +285,9 @@ set(KOPROPERTIES_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kobase ${CMAKE_BINARY_DIR}/li
### Karbon: pigment
set(SHOULD_BUILD_KARBON TRUE)
if (NOT BUILD_pigment)
if (NOT BUILD_PIGMENT)
set(SHOULD_BUILD_KARBON FALSE)
endif (NOT BUILD_pigment)
endif (NOT BUILD_PIGMENT)
### KSpread: eigen2
set(SHOULD_BUILD_KSPREAD TRUE)
......@@ -330,9 +309,9 @@ endif(NOT BZIP2_EXECUTABLE )
### Krita: non-win32, pigment, blitz, eigen2, exiv2
set(SHOULD_BUILD_KRITA TRUE)
if(WIN32 OR NOT FULL_PIGMENT OR NOT BUILD_pigment OR NOT BLITZ_FOUND OR NOT EIGEN2_FOUND OR NOT EXIV2_FOUND)
if(WIN32 OR NOT BUILD_PIGMENT OR NOT BLITZ_FOUND OR NOT EIGEN2_FOUND OR NOT EXIV2_FOUND)
set(SHOULD_BUILD_KRITA FALSE)
endif(WIN32 OR NOT FULL_PIGMENT OR NOT BUILD_pigment OR NOT BLITZ_FOUND OR NOT EIGEN2_FOUND OR NOT EXIV2_FOUND)
endif(WIN32 OR NOT BUILD_PIGMENT OR NOT BLITZ_FOUND OR NOT EIGEN2_FOUND OR NOT EXIV2_FOUND)
### KPlato: kdepimlibs
set(SHOULD_BUILD_KPLATO TRUE)
......
......@@ -38,9 +38,7 @@
#include <QtGui/QPainter>
#ifndef NO_PIGMENT
#include <KoColor.h>
#endif
qreal squareDistance( const QPointF &p1, const QPointF &p2)
{
......@@ -165,11 +163,7 @@ void KoCreatePathTool::mousePressEvent(KoPointerEvent *event)
m_shape = new KoPathShape();
m_shape->setShapeId(KoPathShapeId);
KoLineBorder * border = new KoLineBorder(m_canvas->resourceProvider()->activeBorder());
#ifndef NO_PIGMENT
border->setColor(m_canvas->resourceProvider()->foregroundColor().toQColor());
#else
border->setColor(m_canvas->resourceProvider()->foregroundColor());
#endif
m_shape->setBorder(border);
m_canvas->updateCanvas(m_canvas->snapGuide()->boundingRect());
QPointF point = m_canvas->snapGuide()->snap(event->point, event->modifiers());
......
......@@ -2,6 +2,7 @@ include_directories(
${KOMAIN_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/widgets/documentsectionbox
${CMAKE_SOURCE_DIR}/libs/widgets
${PIGMENT_INCLUDES}
)
if(KDE4_BUILD_TESTS)
......@@ -9,10 +10,6 @@ if(KDE4_BUILD_TESTS)
add_definitions(-DCOMPILING_TESTS)
endif(KDE4_BUILD_TESTS)
if(NOT NO_PIGMENT)
include_directories(${PIGMENT_INCLUDES})
endif(NOT NO_PIGMENT)
add_subdirectory(tests)
add_subdirectory(tools)
......
......@@ -2,102 +2,84 @@ project(pigmentcms)
include_directories( ${PIGMENT_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
if (SMALL_PIGMENT)
set(pigmentcms_SRCS
KoColor.cpp
)
set(PIGMENT_INSTALL_FILES
pigment_export.h
DebugPigment.h
KoBasicHistogramProducers.h
KoChannelInfo.h
KoColor.h
)
else (SMALL_PIGMENT)
include_directories( ${LCMS_INCLUDE_DIR} )
add_subdirectory( colorprofiles )
set(FILE_OPENEXR_SOURCES)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
add_definitions(${OPENEXR_DEFINITIONS})
endif(OPENEXR_FOUND)
set(pigmentcms_SRCS
KoBasicHistogramProducers.cpp
KoColor.cpp
KoColorConversionAlphaTransformation.cpp
KoColorConversionCache.cpp
KoColorConversions.cpp
KoColorConversionSystem.cpp
KoColorConversionTransformation.cpp
KoColorConversionTransformationFactory.cpp
KoColorModelStandardIds.cpp
KoColorProfile.cpp
KoColorSpace.cpp
KoColorSpaceEngine.cpp
KoColorSpaceMaths.cpp
KoColorSpaceRegistry.cpp
KoColorTransformation.cpp
KoColorTransformationFactory.cpp
KoColorTransformationFactoryRegistry.cpp
KoCompositeOp.cpp
KoCopyColorConversionTransformation.cpp
KoFallBackColorTransformation.cpp
KoHistogramProducer.cpp
KoIccColorSpaceEngine.cpp
KoLcmsColorSpace.cpp
KoMultipleColorConversionTransformation.cpp
KoUniqueNumberForIdServer.cpp
colorprofiles/KoIccColorProfile.cpp
colorprofiles/KoLcmsColorProfileContainer.cpp
colorspaces/KoAlphaColorSpace.cpp
colorspaces/KoLabColorSpace.cpp
colorspaces/KoRgbU16ColorSpace.cpp
colorspaces/KoRgbU8ColorSpace.cc
colorspaces/KoRgbU8CompositeOp.cpp
)
set(PIGMENT_INSTALL_FILES
pigment_export.h
DebugPigment.h
KoBasicHistogramProducers.h
KoChannelInfo.h
KoColor.h
KoColorConversionTransformation.h
KoColorConversionTransformationAbstractFactory.h
KoColorConversionTransformationFactory.h
KoColorModelStandardIds.h
KoColorProfile.h
KoColorSpace.h
KoColorSpaceEngine.h
KoColorSpaceAbstract.h
KoColorSpaceConstants.h
KoColorSpaceMaths.h
KoColorSpaceRegistry.h
KoColorSpaceTraits.h
KoColorTransformation.h
KoColorTransformationFactory.h
KoColorTransformationFactoryRegistry.h
KoCompositeOp.h
KoFallBackColorTransformation.h
KoIntegerMaths.h
KoLabDarkenColorTransformation.h
KoMixColorsOpImpl.h
KoHistogramProducer.h
)
include_directories( ${LCMS_INCLUDE_DIR} )
add_subdirectory( colorprofiles )
set(FILE_OPENEXR_SOURCES)
set(LINK_OPENEXR_LIB)
if(OPENEXR_FOUND)
include_directories(${OPENEXR_INCLUDE_DIR})
set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
add_definitions(${OPENEXR_DEFINITIONS})
endif(OPENEXR_FOUND)
set(pigmentcms_SRCS
KoBasicHistogramProducers.cpp
KoColor.cpp
KoColorConversionAlphaTransformation.cpp
KoColorConversionCache.cpp
KoColorConversions.cpp
KoColorConversionSystem.cpp
KoColorConversionTransformation.cpp
KoColorConversionTransformationFactory.cpp
KoColorModelStandardIds.cpp
KoColorProfile.cpp
KoColorSpace.cpp
KoColorSpaceEngine.cpp
KoColorSpaceMaths.cpp
KoColorSpaceRegistry.cpp
KoColorTransformation.cpp
KoColorTransformationFactory.cpp
KoColorTransformationFactoryRegistry.cpp
KoCompositeOp.cpp
KoCopyColorConversionTransformation.cpp
KoFallBackColorTransformation.cpp
KoHistogramProducer.cpp
KoIccColorSpaceEngine.cpp
KoLcmsColorSpace.cpp
KoMultipleColorConversionTransformation.cpp
KoUniqueNumberForIdServer.cpp
colorprofiles/KoIccColorProfile.cpp
colorprofiles/KoLcmsColorProfileContainer.cpp
colorspaces/KoAlphaColorSpace.cpp
colorspaces/KoLabColorSpace.cpp
colorspaces/KoRgbU16ColorSpace.cpp
colorspaces/KoRgbU8ColorSpace.cc
colorspaces/KoRgbU8CompositeOp.cpp
)
add_subdirectory(tests)
set(PIGMENT_INSTALL_FILES
pigment_export.h
DebugPigment.h
KoBasicHistogramProducers.h
KoChannelInfo.h
KoColor.h
KoColorConversionTransformation.h
KoColorConversionTransformationAbstractFactory.h
KoColorConversionTransformationFactory.h
KoColorModelStandardIds.h
KoColorProfile.h
KoColorSpace.h
KoColorSpaceEngine.h
KoColorSpaceAbstract.h
KoColorSpaceConstants.h
KoColorSpaceMaths.h
KoColorSpaceRegistry.h
KoColorSpaceTraits.h
KoColorTransformation.h
KoColorTransformationFactory.h
KoColorTransformationFactoryRegistry.h
KoCompositeOp.h
KoFallBackColorTransformation.h
KoIntegerMaths.h
KoLabDarkenColorTransformation.h
KoMixColorsOpImpl.h
KoHistogramProducer.h
)
set (EXTRA_LIBRARIES ${LCMS_LIBRARIES} ${LINK_OPENEXR_LIB})
add_subdirectory(tests)
endif (SMALL_PIGMENT)
set (EXTRA_LIBRARIES ${LCMS_LIBRARIES} ${LINK_OPENEXR_LIB})
if(MSVC)
# avoid "cannot open file 'LIBC.lib'" error
......
......@@ -26,10 +26,6 @@
#include "KoColor.h"
#ifdef NO_PIGMENT
#else
#include "KoColorModelStandardIds.h"
#include "KoColorProfile.h"
#include "KoColorSpace.h"
......@@ -309,5 +305,3 @@ KoColor KoColor::fromXML(const QDomElement& elt, const QString & bitDepthId, con
return KoColor();
}
}
#endif
......@@ -27,15 +27,6 @@
class QDomDocument;
class QDomElement;
#ifdef NO_PIGMENT
class PIGMENTCMS_EXPORT KoColor : public QColor {
QColor toQColor() { return QColor(this); }
};
#else
class KoColorProfile;
class KoColorSpace;
......@@ -163,7 +154,6 @@ private:
class Private;
Private * const d;
};
#endif
Q_DECLARE_METATYPE( KoColor )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment