1 project(unipresent_openoffice)
3 set(SHOULD_BUILD_OOO_PLUGIN YES)
4 if (NOT SHOULD_BUILD_OOO_PLUGIN)
5 message(STATUS "OpenOffice.org Impress integration plugin will not be built")
6 else (NOT SHOULD_BUILD_OOO_PLUGIN)
11 message(STATUS "OpenOffice.org SDK NOT found - OpenOffice.org Impress integration plugin will not be built")
13 message(STATUS "OpenOffice.org SDK found - OpenOffice.org Impress integration plugin will be built")
15 find_package(KDE4 REQUIRED)
17 # Remove flags from CMAKE_CXX_FLAGS
18 MACRO (REMOVE_CXX_FLAGS)
20 STRING(REPLACE "${FLAG}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
22 ENDMACRO (REMOVE_CXX_FLAGS)
24 # KDE adds a bunch of flags, several of which UNO doesn't like
25 # UNO throws exceptions
26 REMOVE_CXX_FLAGS(-fno-exceptions)
27 # -fvisibility=hidden prevents us from catching UNO exceptions
28 REMOVE_CXX_FLAGS(-fvisibility=hidden)
29 # These flags cause lots of warnings with UNO
30 REMOVE_CXX_FLAGS(-Wnon-virtual-dtor -Wundef -Wall -Wformat-security)
32 include_directories(${KDE4_INCLUDES}
35 include_directories(${UNO_INCLUDES})
37 set(unipresent_openoffice_UNOTYPES
38 com.sun.star.beans.XPropertySet
39 com.sun.star.bridge.XUnoUrlResolver
40 com.sun.star.container.XEnumeration
41 com.sun.star.container.XEnumerationAccess
42 com.sun.star.container.XIndexAccess
43 com.sun.star.container.XHierarchicalNameAccess
44 com.sun.star.drawing.XDrawPagesSupplier
45 com.sun.star.drawing.XDrawPages
46 com.sun.star.drawing.XDrawPage
47 com.sun.star.drawing.XShapes
48 com.sun.star.text.XText
49 com.sun.star.frame.XComponentLoader
50 com.sun.star.frame.XDesktop
51 com.sun.star.lang.XComponent
52 com.sun.star.lang.XMultiComponentFactory
53 com.sun.star.lang.XMultiServiceFactory
54 com.sun.star.presentation.XPresentationSupplier
55 com.sun.star.presentation.XPresentation
56 com.sun.star.registry.XSimpleRegistry
59 set(unipresent_openoffice_SRCS
66 UNO_ADD_TYPES(unipresent_openoffice_SRCS
67 ${unipresent_openoffice_UNOTYPES}
70 kde4_add_plugin(unipresent_openoffice ${unipresent_openoffice_SRCS})
72 target_link_libraries(unipresent_openoffice
80 ########### install files ###############
82 install( TARGETS unipresent_openoffice DESTINATION ${PLUGIN_INSTALL_DIR} )
83 install( FILES unipresent_openoffice.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
85 install( FILES ${UNO_RDB}
86 DESTINATION ${DATA_INSTALL_DIR}/unipresent/openoffice.org
89 endif (NOT SHOULD_BUILD_OOO_PLUGIN)