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.document.XDocumentEventBroadcaster
45 com.sun.star.document.XDocumentEventListener
46 com.sun.star.drawing.XDrawPagesSupplier
47 com.sun.star.drawing.XDrawPages
48 com.sun.star.drawing.XDrawPage
49 com.sun.star.drawing.XShapes
50 com.sun.star.text.XText
51 com.sun.star.frame.XComponentLoader
52 com.sun.star.frame.XDesktop
53 com.sun.star.lang.XComponent
54 com.sun.star.lang.XMultiComponentFactory
55 com.sun.star.lang.XMultiServiceFactory
56 com.sun.star.lang.XTypeProvider
57 com.sun.star.presentation.XPresentationSupplier
58 com.sun.star.presentation.XPresentation
59 com.sun.star.presentation.XPresentation2
60 com.sun.star.presentation.XSlideShowController
61 com.sun.star.registry.XSimpleRegistry
62 com.sun.star.uno.XAggregation
63 com.sun.star.uno.XWeak
66 set(unipresent_openoffice_SRCS
73 UNO_ADD_TYPES(unipresent_openoffice_SRCS
74 ${unipresent_openoffice_UNOTYPES}
77 kde4_add_plugin(unipresent_openoffice ${unipresent_openoffice_SRCS})
79 target_link_libraries(unipresent_openoffice
87 ########### install files ###############
89 install( TARGETS unipresent_openoffice DESTINATION ${PLUGIN_INSTALL_DIR} )
90 install( FILES unipresent_openoffice.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
92 install( FILES ${UNO_RDB}
93 DESTINATION ${DATA_INSTALL_DIR}/unipresent/openoffice.org
96 endif (NOT SHOULD_BUILD_OOO_PLUGIN)