CMakeLists.txt 3.92 KB
Newer Older
1
project(pigmentcms)
2

Boudewijn Rempt's avatar
Boudewijn Rempt committed
3
include_directories( ${PIGMENT_INCLUDES} ${QT_INCLUDES} ${Boost_INCLUDE_DIR})
4

5 6 7 8 9 10 11 12
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)

13
set(LINK_VC_LIB)
Boudewijn Rempt's avatar
Boudewijn Rempt committed
14
if(HAVE_VC)
15 16 17
  include_directories(${Vc_INCLUDE_DIR})
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}")
  set(LINK_VC_LIB ${Vc_LIBRARIES})
Boudewijn Rempt's avatar
Boudewijn Rempt committed
18
endif(HAVE_VC)
19

20 21 22
add_subdirectory(tests)
add_subdirectory(benchmarks)

23 24 25 26 27 28 29 30 31 32 33 34 35
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
36
    KoColorSpaceFactory.cpp
37 38 39 40 41 42
    KoColorSpaceMaths.cpp
    KoColorSpaceRegistry.cpp
    KoColorTransformation.cpp
    KoColorTransformationFactory.cpp
    KoColorTransformationFactoryRegistry.cpp
    KoCompositeOp.cpp
43
    KoCompositeOpRegistry.cpp
44 45 46 47 48 49 50 51
    KoCopyColorConversionTransformation.cpp
    KoFallBackColorTransformation.cpp
    KoHistogramProducer.cpp
    KoMultipleColorConversionTransformation.cpp
    KoUniqueNumberForIdServer.cpp
    colorspaces/KoAlphaColorSpace.cpp
    colorspaces/KoLabColorSpace.cpp
    colorspaces/KoRgbU16ColorSpace.cpp
Boudewijn Rempt's avatar
Boudewijn Rempt committed
52
    colorspaces/KoRgbU8ColorSpace.cpp
53
    colorspaces/KoSimpleColorSpaceEngine.cpp
54
    compositeops/KoOptimizedCompositeOpFactory.cpp
55
    compositeops/KoOptimizedCompositeOpFactory_p.cpp
Cyrille Berger's avatar
Cyrille Berger committed
56
    colorprofiles/KoDummyColorProfile.cpp
57 58 59 60 61 62
    resources/KoAbstractGradient.cpp
    resources/KoColorSet.cpp
    resources/KoPattern.cpp
    resources/KoResource.cpp
    resources/KoStopGradient.cpp
    resources/KoSegmentGradient.cpp
63
)
64

65 66 67 68 69 70 71 72 73 74 75 76 77
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
78
        KoColorSpaceFactory.h
79 80 81 82
        KoColorSpaceAbstract.h
        KoColorSpaceConstants.h
        KoColorSpaceMaths.h
        KoColorSpaceRegistry.h
83
        KoCmykColorSpaceTraits.h
84
        KoColorSpaceTraits.h
85 86 87 88 89
        KoGrayColorSpaceTraits.h
        KoLabColorSpaceTraits.h
        KoRgbColorSpaceTraits.h
        KoXyzColorSpaceTraits.h
        KoYcbcrColorSpaceTraits.h
90 91 92 93
        KoColorTransformation.h
        KoColorTransformationFactory.h
        KoColorTransformationFactoryRegistry.h
        KoCompositeOp.h
94
        KoConvolutionOp.h
95 96 97
        KoFallBackColorTransformation.h
        KoIntegerMaths.h
        KoLabDarkenColorTransformation.h
98
        KoMixColorsOp.h
99 100 101
        KoMixColorsOpImpl.h
        KoHistogramProducer.h
)
102

103
set (EXTRA_LIBRARIES ${LINK_OPENEXR_LIB} ${LINK_VC_LIB})
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120

if(MSVC)
  # avoid "cannot open file 'LIBC.lib'" error
  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBC.LIB")
endif(MSVC)

kde4_add_library(pigmentcms SHARED ${pigmentcms_SRCS})

target_link_libraries(
    pigmentcms
    koplugin
    ${EXTRA_LIBRARIES}
    ${QT_QTGUI_LIBRARY}
    ${QT_QTXML_LIBRARY}
    )

target_link_libraries(
121
    pigmentcms LINK_INTERFACE_LIBRARIES koplugin ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${EXTRA_LIBRARIES}
122 123 124
)

set_target_properties(pigmentcms PROPERTIES
Boudewijn Rempt's avatar
Boudewijn Rempt committed
125
    VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
126 127 128 129 130
)

install(TARGETS pigmentcms  ${INSTALL_TARGETS_DEFAULT_ARGS})

install( FILES ${PIGMENT_INSTALL_FILES}
Laurent Montel's avatar
Laurent Montel committed
131
         DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
132

133
install( FILES pigment.desktop pigmentextension.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})