Warning, /office/calligra/libs/pigment/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 project(pigmentcms)
0002 
0003 # we have to repeat platform specifics from top-level
0004 if (WIN32)
0005     include_directories(${CMAKE_SOURCE_DIR}/winquirks)
0006     add_definitions(-D_USE_MATH_DEFINES)
0007     add_definitions(-DNOMINMAX)
0008     set(WIN32_PLATFORM_NET_LIBS ws2_32.lib netapi32.lib)
0009 endif ()
0010 
0011 include_directories( ${PIGMENT_INCLUDES}  ${Boost_INCLUDE_DIR})
0012 
0013 set(FILE_OPENEXR_SOURCES)
0014 set(LINK_OPENEXR_LIB)
0015 if(OPENEXR_FOUND)
0016     include_directories(${OPENEXR_INCLUDE_DIR})
0017     set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
0018     add_definitions(${OPENEXR_DEFINITIONS})
0019 endif()
0020 
0021 set(LINK_VC_LIB)
0022 
0023 if(HAVE_VC)
0024     include_directories(${Vc_INCLUDE_DIR})
0025     set(LINK_VC_LIB ${Vc_LIBRARIES})
0026     kde_enable_exceptions()
0027     ko_compile_for_all_implementations_no_scalar(__per_arch_factory_objs compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp)
0028 
0029     message("Following objects are generated from the per-arch lib")
0030     message(${__per_arch_factory_objs})
0031     # silence warnings for using older Vc API for now, where "the tuple" should be built "with Vc::tie"
0032     if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
0033         add_definitions(-Wno-deprecated-declarations)
0034     endif ()
0035 endif()
0036 
0037 if(BUILD_TESTING)
0038     add_subdirectory(tests)
0039     add_subdirectory(benchmarks)
0040 endif()
0041 
0042 set(pigmentcms_SRCS
0043     DebugPigment.cpp
0044     KoBasicHistogramProducers.cpp
0045     KoColor.cpp
0046     KoColorDisplayRendererInterface.cpp
0047     KoColorConversionAlphaTransformation.cpp
0048     KoColorConversionCache.cpp
0049     KoColorConversions.cpp
0050     KoColorConversionSystem.cpp
0051     KoColorConversionTransformation.cpp
0052     KoColorConversionTransformationFactory.cpp
0053     KoColorModelStandardIds.cpp
0054     KoColorProfile.cpp
0055     KoColorSpace.cpp
0056     KoColorSpaceEngine.cpp
0057     KoColorSpaceFactory.cpp
0058     KoColorSpaceMaths.cpp
0059     KoColorSpaceRegistry.cpp
0060     KoColorTransformation.cpp
0061     KoColorTransformationFactory.cpp
0062     KoColorTransformationFactoryRegistry.cpp
0063     KoCompositeColorTransformation.cpp
0064     KoCompositeOp.cpp
0065     KoCompositeOpRegistry.cpp
0066     KoCopyColorConversionTransformation.cpp
0067     KoFallBackColorTransformation.cpp
0068     KoHistogramProducer.cpp
0069     KoMultipleColorConversionTransformation.cpp
0070     KoUniqueNumberForIdServer.cpp
0071     colorspaces/KoAlphaColorSpace.cpp
0072     colorspaces/KoLabColorSpace.cpp
0073     colorspaces/KoRgbU16ColorSpace.cpp
0074     colorspaces/KoRgbU8ColorSpace.cpp
0075     colorspaces/KoSimpleColorSpaceEngine.cpp
0076     compositeops/KoOptimizedCompositeOpFactory.cpp
0077     compositeops/KoOptimizedCompositeOpFactoryPerArch_Scalar.cpp
0078     ${__per_arch_factory_objs}
0079     colorprofiles/KoDummyColorProfile.cpp
0080     resources/KoAbstractGradient.cpp
0081     resources/KoColorSet.cpp
0082     resources/KoPattern.cpp
0083     resources/KoResource.cpp
0084     resources/KoMD5Generator.cpp
0085     resources/KoHashGeneratorProvider.cpp
0086     resources/KoStopGradient.cpp
0087     resources/KoSegmentGradient.cpp
0088 )
0089 
0090 
0091 set(PIGMENT_INSTALL_FILES
0092         ${CMAKE_CURRENT_BINARY_DIR}/pigment_export.h
0093         DebugPigment.h
0094         KoBasicHistogramProducers.h
0095         KoChannelInfo.h
0096         KoColor.h
0097         KoColorConversionTransformation.h
0098         KoColorConversionTransformationAbstractFactory.h
0099         KoColorConversionTransformationFactory.h
0100         KoColorModelStandardIds.h
0101         KoColorProfile.h
0102         KoColorSpace.h
0103         KoColorSpaceEngine.h
0104         KoColorSpaceFactory.h
0105         KoColorSpaceAbstract.h
0106         KoColorSpaceConstants.h
0107         KoColorSpaceMaths.h
0108         KoColorSpaceRegistry.h
0109         KoCmykColorSpaceTraits.h
0110         KoColorSpaceTraits.h
0111         KoGrayColorSpaceTraits.h
0112         KoLabColorSpaceTraits.h
0113         KoRgbColorSpaceTraits.h
0114         KoXyzColorSpaceTraits.h
0115         KoYcbcrColorSpaceTraits.h
0116         KoColorTransformation.h
0117         KoColorTransformationFactory.h
0118         KoColorTransformationFactoryRegistry.h
0119         KoCompositeOp.h
0120         KoConvolutionOp.h
0121         KoFallBackColorTransformation.h
0122         KoIntegerMaths.h
0123         KoLabDarkenColorTransformation.h
0124         KoMixColorsOp.h
0125         KoMixColorsOpImpl.h
0126         KoHistogramProducer.h
0127 )
0128 
0129 set (EXTRA_LIBRARIES ${LINK_OPENEXR_LIB} ${LINK_VC_LIB})
0130 
0131 if(MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
0132   # avoid "cannot open file 'LIBC.lib'" error
0133   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBC.LIB")
0134 endif()
0135 
0136 add_library(pigmentcms SHARED ${pigmentcms_SRCS})
0137 generate_export_header(pigmentcms
0138     BASE_NAME pigment
0139     EXPORT_MACRO_NAME PIGMENTCMS_EXPORT
0140 )
0141 
0142 target_link_libraries(pigmentcms
0143     PUBLIC
0144         KF5::I18n
0145         Qt5::Xml
0146         Qt5::Gui
0147         ${EXTRA_LIBRARIES}
0148     PRIVATE
0149         koplugin
0150         ${WIN32_PLATFORM_NET_LIBS}
0151 )
0152 
0153 if (HAVE_VC AND NOT PACKAGERS_BUILD)
0154     set_property(TARGET pigmentcms APPEND PROPERTY COMPILE_OPTIONS "${Vc_ARCHITECTURE_FLAGS}")
0155 endif()
0156 
0157 set_target_properties(pigmentcms PROPERTIES
0158     VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
0159 )
0160 
0161 install(TARGETS pigmentcms  ${INSTALL_TARGETS_DEFAULT_ARGS})
0162 
0163 # TODO: with the new embedded JSON data for plugins there is no schema ATM to define extended properties
0164 # pigment.desktop pigmentextension.desktop
0165 
0166 if (SHOULD_BUILD_DEVEL_HEADERS)
0167 install( FILES ${PIGMENT_INSTALL_FILES}
0168          DESTINATION ${INCLUDE_INSTALL_DIR}/calligra COMPONENT Devel)
0169 endif()