Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / nsplugins / CMakeLists.txt
blobfd48ddb9f3cc97945b38c44681ae520664a8be9f
1 macro_optional_find_package(GLIB2)
2 macro_log_feature(GLIB2_FOUND "glib2" "Low-level core library for data structure handling, portability wrappers, etc." "http://www.gtk.org" FALSE "2.x" "Glib event loop integration from Qt is required for Netscape plugins support.")
3 if(GLIB2_FOUND)
4   set(HAVE_GLIB2 1)
5 endif( GLIB2_FOUND)
7 configure_file (config-nsplugins.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nsplugins.h )
9 if (X11_Xt_LIB)
11   add_subdirectory( viewer ) 
14   ########### next target ###############
16   set(nsplugins_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/plugin_part.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nspluginloader.cpp )
18   set(nsplugins_PART_SRCS
19        ${nsplugins_SRCS}
20     )
22   qt4_add_dbus_adaptor( nsplugins_PART_SRCS org.kde.nsplugins.CallBack.xml ${CMAKE_CURRENT_SOURCE_DIR}/plugin_part.h PluginPart )
24   set(nsplugins_class_xml  ${CMAKE_CURRENT_SOURCE_DIR}/viewer/org.kde.nsplugins.class.xml)
25   QT4_ADD_DBUS_INTERFACE( nsplugins_PART_SRCS ${nsplugins_class_xml} nsplugins_class_interface )
27   set(nsplugins_instance_xml  ${CMAKE_CURRENT_SOURCE_DIR}/viewer/org.kde.nsplugins.instance.xml)
28   QT4_ADD_DBUS_INTERFACE( nsplugins_PART_SRCS ${nsplugins_instance_xml} nsplugins_instance_interface )
30   set(nsplugins_viewer_xml  ${CMAKE_CURRENT_SOURCE_DIR}/viewer/org.kde.nsplugins.viewer.xml)
31   QT4_ADD_DBUS_INTERFACE( nsplugins_PART_SRCS ${nsplugins_viewer_xml} nsplugins_viewer_interface )
34   kde4_add_plugin(libnsplugin ${nsplugins_PART_SRCS})
36   target_link_libraries(libnsplugin ${KDE4_KPARTS_LIBS} ${QT_QTGUI_LIBRARY})
38   install(TARGETS libnsplugin  DESTINATION ${PLUGIN_INSTALL_DIR} )
41   ########### next target ###############
43   set(kcminit_nsplugins_SRCS kcm_nsplugins.cpp plugin_paths.cpp)
46   kde4_add_plugin(kcminit_nsplugins WITH_PREFIX  ${kcminit_nsplugins_SRCS})
48   target_link_libraries(kcminit_nsplugins ${KDE4_KDECORE_LIBS} )
50   install(TARGETS kcminit_nsplugins  DESTINATION ${PLUGIN_INSTALL_DIR} )
53   ########### nspluginscan ###############
55   set(nspluginscan_SRCS pluginscan.cpp plugin_paths.cpp ../konqueror/settings/filetypes/mimetypewriter.cpp)
57   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../konqueror/settings/filetypes/)
59   kde4_add_executable(nspluginscan ${nspluginscan_SRCS})
61   target_link_libraries(nspluginscan  ${KDE4_KIO_LIBS} ${X11_Xt_LIB})
63   install(TARGETS nspluginscan ${INSTALL_TARGETS_DEFAULT_ARGS})
65   ########### install files ###############
67   install( FILES khtml_plugins.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
68   install( FILES nspluginpart.rc  DESTINATION  ${DATA_INSTALL_DIR}/plugin )
69   install( FILES org.kde.nsplugins.CallBack.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
71   add_subdirectory( test )
73 else (X11_Xt_LIB)
75   message(STATUS "libXt not found - browser plugin support disabled")
77 endif (X11_Xt_LIB)