add_subdirectory(xim)
add_subdirectory(ipc)
add_subdirectory(ipcportal)

if(_ENABLE_DBUS)
  if(ENABLE_GLIB2 AND (ENABLE_GTK2_IM_MODULE OR ENABLE_GTK3_IM_MODULE))
    PKG_CHECK_MODULES(GLIB2 REQUIRED "glib-2.0" )
    PKG_CHECK_MODULES(GIO2 REQUIRED "gio-2.0>=2.26")
    _pkgconfig_invoke("glib-2.0" GLIB2 GLIB_GENMARSHAL
      "" "--variable=glib_genmarshal")
    FIND_PROGRAM(GLIB_GENMARSHAL ${GLIB2_GLIB_GENMARSHAL})
  endif()
  if(NOT ENABLE_GLIB2)
    set(ENABLE_GTK2_IM_MODULE off)
    set(ENABLE_GTK3_IM_MODULE off)
  endif()
else()
  set(ENABLE_QT_IM_MODULE off)
  set(ENABLE_GTK2_IM_MODULE off)
  set(ENABLE_GTK3_IM_MODULE off)
endif()

add_subdirectory(gtk2)
add_subdirectory(gtk3)
add_subdirectory(qt)
