include(CMakeDependentOption)
pkg_check_modules(WNCK libwnck-3.0)
pkg_check_modules(X11 x11 xcomposite xdamage xfixes gdk-x11-3.0)
cmake_dependent_option(ENABLE_X11 "Enables X11 system tray" ON
    "X11_FOUND" OFF)
cmake_dependent_option(ENABLE_WNCK "Enables wnck-related plugins, like taskbar and pager" ON
    "WNCK_FOUND;ENABLE_X11" OFF)

if (ENABLE_WNCK)
    add_subdirectory(tasklist)
    add_subdirectory(tasklist-xfce)
    add_subdirectory(pager)
    add_subdirectory(icontasks)
    add_subdirectory(deskno)
    add_subdirectory(wincmd)
    add_subdirectory(buttons)
endif()

if (ENABLE_X11)
    add_subdirectory(xembed)
endif()
