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

0001 add_definitions(-DTRANSLATION_DOMAIN=\"calligra_shape_formula\")
0002 
0003 # To hide all the warnings from the generated itex2MML code
0004 if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
0005     add_definitions(-Wno-unused-label)
0006     add_definitions(-Wno-sign-compare)
0007     add_definitions(-Wno-unused-function)
0008 endif ()
0009 
0010 set(ITEXTOMML_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/itexToMML")
0011 
0012 include_directories( ${CMAKE_SOURCE_DIR}/plugins/formulashape
0013                      ${CMAKE_SOURCE_DIR}/plugins/formulashape/elements
0014                      
0015                      ${KOMAIN_INCLUDES}
0016 )
0017 
0018 ########### KoFormula Library ###############
0019 
0020 set( koformula_LIB_SRCS
0021    FormulaDebug.cpp
0022    AttributeManager.cpp
0023    FormulaRenderer.cpp
0024    FormulaData.cpp
0025    FormulaCursor.cpp
0026    FormulaEditor.cpp
0027    FormulaCommand.cpp
0028    ElementFactory.cpp 
0029    Dictionary.cpp
0030 
0031    elements/BasicElement.cpp
0032    elements/FixedElement.cpp
0033    elements/RowElement.cpp
0034    elements/FormulaElement.cpp 
0035    elements/TextElement.cpp
0036    elements/FractionElement.cpp
0037    elements/SpaceElement.cpp
0038    elements/GlyphElement.cpp
0039    elements/IdentifierElement.cpp
0040    elements/OperatorElement.cpp
0041    elements/MultiscriptElement.cpp
0042    elements/SubSupElement.cpp
0043    elements/UnderOverElement.cpp
0044    elements/FencedElement.cpp 
0045    elements/TableElement.cpp
0046    elements/TableRowElement.cpp
0047    elements/TableDataElement.cpp
0048    elements/RootElement.cpp
0049    elements/EncloseElement.cpp
0050    elements/ActionElement.cpp
0051    elements/PaddedElement.cpp
0052    elements/ErrorElement.cpp
0053    elements/StyleElement.cpp
0054    elements/TokenElement.cpp
0055    elements/NumberElement.cpp
0056    elements/StringElement.cpp
0057    elements/PhantomElement.cpp
0058    elements/SquareRootElement.cpp
0059    elements/AnnotationElement.cpp
0060    elements/UnknownElement.cpp
0061 )
0062 
0063 add_library(koformula SHARED ${koformula_LIB_SRCS})
0064 generate_export_header(koformula EXPORT_MACRO_NAME KOFORMULA_EXPORT)
0065 
0066 target_link_libraries(koformula  PUBLIC komain)
0067 
0068 set_target_properties(koformula PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} )
0069 
0070 install(TARGETS koformula ${INSTALL_TARGETS_DEFAULT_ARGS})
0071 
0072 ########### FormulaShape Plugin ###############
0073 
0074 find_package(Cauchy)
0075 
0076 macro_optional_find_package(Cauchy)
0077 set_package_properties(Cauchy PROPERTIES
0078     DESCRIPTION "Cauchy's M2MML, a Matlab/Octave to MathML compiler"
0079     URL "https://bitbucket.org/cyrille/cauchy"
0080     PURPOSE "Required for the matlab/octave formula tool"
0081     TYPE OPTIONAL
0082 )
0083 
0084 if(M2MML_FOUND)
0085     set(M2MML_TOOL_LIBRARIES ${M2MML_LIBRARY})
0086     include_directories(${CAUCHY_INCLUDE_DIR})
0087     add_definitions(-DHAVE_M2MML)
0088 endif()
0089 
0090 set( formulashape_PART_SRCS
0091    KoFormulaShapePlugin.cpp
0092    KoFormulaShape.cpp
0093    FormulaCommandUpdate.cpp
0094    KoFormulaShapeFactory.cpp
0095    KoFormulaTool.cpp
0096    FormulaCommand.cpp
0097    KoFormulaToolFactory.cpp
0098    FormulaToolWidget.cpp
0099    FormulaDocument.cpp
0100    FormulaPart.cpp
0101 )
0102 
0103 if (NOT MSVC AND NOT (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
0104 set (formulashape_PART_SRCS
0105    ${formulashape_PART_SRCS}
0106    KoM2MMLForumulaTool.cpp
0107    # itexToMML files
0108    ${ITEXTOMML_SOURCE_DIR}/lex.yy.c
0109    ${ITEXTOMML_SOURCE_DIR}/y.tab.c
0110 )
0111 endif ()
0112 
0113 ki18n_wrap_ui( formulashape_PART_SRCS
0114     FormulaToolWidget.ui
0115 )
0116 
0117 add_library(calligra_shape_formula MODULE ${formulashape_PART_SRCS})
0118 calligra_shape_desktop_to_json(calligra_shape_formula calligra_shape_formula.desktop)
0119 
0120 target_link_libraries(calligra_shape_formula koformula ${M2MML_TOOL_LIBRARIES})
0121 
0122 
0123 #set_target_properties(koformula PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} )
0124 install(TARGETS calligra_shape_formula  DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/shapes)
0125 
0126 add_subdirectory( pics ) 
0127 # TODO: those font files seem unused currently, investigate if still needed
0128 # add_subdirectory( fonts )
0129 if(BUILD_TESTING)
0130     add_subdirectory( tests )
0131 endif()
0132 add_subdirectory( templates )