Basic openoffice.org control, and listening for new presentation documents, still...
[kworship.git] / unipresent / openoffice.org / CMakeLists.txt
blob210b04c6fbae6c7262581c2585496a2417e4c50b
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)
8   # We need uno
9   find_package(UNO)
10   if (NOT UNO_FOUND)
11     message(STATUS "OpenOffice.org SDK NOT found - OpenOffice.org Impress integration plugin will not be built")
12   else (NOT UNO_FOUND)
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)
19       FOREACH(FLAG ${ARGN})
20         STRING(REPLACE "${FLAG}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
21       ENDFOREACH(FLAG)
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}
33                         ${QT_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
64     )
66     set(unipresent_openoffice_SRCS
67         UpOoBackend.cpp
68         UpOoBridge.cpp
69         UpOoPresentation.cpp
70         UpOoSlide.cpp
71     )
73     UNO_ADD_TYPES(unipresent_openoffice_SRCS
74                   ${unipresent_openoffice_UNOTYPES}
75     )
77     kde4_add_plugin(unipresent_openoffice ${unipresent_openoffice_SRCS})
79     target_link_libraries(unipresent_openoffice
80                           unipresent
81                           ${KDE4_KDECORE_LIBS}
82                           ${KDE4_KIO_LIBS}
83                           ${QT_LIBRARIES}
84                           ${UNO_LIBS}
85                           )
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
94              RENAME "types.rdb" )
95   endif (NOT UNO_FOUND)
96 endif (NOT SHOULD_BUILD_OOO_PLUGIN)