set (COMPIZ_CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${COMPIZ_CMAKE_MODULE_PATH})
include (CompizDefaults)
include (CompizCommon)

set (COMPIZ_FOUND "true")

add_definitions ( -DHAVE_CONFIG_H)

include_directories (${COMPIZ_INTERNAL_INCLUDES})

# temporarily disable plugins that aren't ported yet
set (COMPIZ_DISABLE_PLUGIN_ANIMATIONADDON ON)
set (COMPIZ_DISABLE_PLUGIN_BICUBIC ON)
set (COMPIZ_DISABLE_PLUGIN_BLUR ON)
set (COMPIZ_DISABLE_PLUGIN_COLORFILTER ON)
set (COMPIZ_DISABLE_PLUGIN_GROUP ON)
set (COMPIZ_DISABLE_PLUGIN_LOGINOUT ON)
set (COMPIZ_DISABLE_PLUGIN_REFLEX ON)
set (COMPIZ_DISABLE_PLUGIN_STACKSWITCH ON)
set (COMPIZ_DISABLE_PLUGIN_TRIP ON)

# disable plugins which won't work on ES2 builds
if (BUILD_GLES)

    set (COMPIZ_DISABLE_PLUGIN_FREEWINS ON)
    set (COMPIZ_DISABLE_PLUGIN_GEARS ON)
    set (COMPIZ_DISABLE_PLUGIN_TD ON)
    set (COMPIZ_DISABLE_PLUGIN_COLORFILTER ON)
    set (COMPIZ_DISABLE_PLUGIN_MBLUR ON)
    set (COMPIZ_DISABLE_PLUGIN_BENCH ON)
    set (COMPIZ_DISABLE_PLUGIN_WIDGET ON)
    set (COMPIZ_DISABLE_PLUGIN_THUMBNAIL ON)

endif (BUILD_GLES)

compiz_add_plugins_in_folder (${CMAKE_CURRENT_SOURCE_DIR})
