4 ########### next target ###############
6 include(MacroOptionalDependPackage)
8 MACRO_OPTIONAL_DEPEND_PACKAGE(KdeWebKit "kdewebkit")
9 if(DEPEND_PACKAGE_KdeWebKit)
10 macro_optional_find_package(KdeWebKit QUIET)
11 else(DEPEND_PACKAGE_KdeWebKit)
12 set(KDEWEBKIT_FOUND FALSE)
13 endif(DEPEND_PACKAGE_KdeWebKit)
15 MACRO_OPTIONAL_DEPEND_PACKAGE(WebKitPart "webkitpart")
16 if(DEPEND_PACKAGE_WebKitPart)
17 macro_optional_find_package(WebKitPart QUIET)
18 else(DEPEND_PACKAGE_WebKitPart)
19 set(WEBKITPART_FOUND FALSE)
20 endif(DEPEND_PACKAGE_WebKitPart)
22 if( KDEWEBKIT_FOUND AND WEBKITPART_FOUND )
23 set( HAVE_WEBKITKDE true)
24 include_directories(${KDEWEBKIT_INCLUDE_DIR})
25 include_directories(${WEBKITPART_INCLUDE_DIR})
26 FIND_PATH(WEBVIEW_PATH webkitkde/webview.h PATH ${KDEWEBKIT_INCLUDE_DIR})
27 macro_bool_to_01(WEBVIEW_PATH HAVE_WEBVIEW )
28 endif( KDEWEBKIT_FOUND AND WEBKITPART_FOUND )
31 configure_file(config-kttsplugin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kttsplugin.h )
34 set(khtmlkttsdplugin_PART_SRCS khtmlkttsd.cpp )
36 qt4_add_dbus_interfaces(khtmlkttsdplugin_PART_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
38 kde4_add_plugin(khtmlkttsdplugin ${khtmlkttsdplugin_PART_SRCS})
40 target_link_libraries(khtmlkttsdplugin ${KDE4_KHTML_LIBS} )
42 if( KDEWEBKIT_FOUND AND WEBKITPART_FOUND)
43 target_link_libraries(khtmlkttsdplugin ${WEBKITPART_LIBRARIES} ${KDEWEBKIT_LIBRARIES} ${QT_QTWEBKIT_LIBRARY} )
44 endif(KDEWEBKIT_FOUND AND WEBKITPART_FOUND)
47 install(TARGETS khtmlkttsdplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
50 ########### install files ###############
52 install( FILES khtmlkttsd.rc khtmlkttsd.desktop DESTINATION ${DATA_INSTALL_DIR}/khtml/kpartplugins )
53 if( KDEWEBKIT_FOUND AND WEBKITPART_FOUND)
54 install( FILES khtmlkttsd.rc khtmlkttsd.desktop DESTINATION ${DATA_INSTALL_DIR}/webkitpart/kpartplugins )
55 endif( KDEWEBKIT_FOUND AND WEBKITPART_FOUND)