project(KMLDONKEY)

find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)

# backward compatibility to <= KDE 4.1
MACRO_ENSURE_VERSION( "4.1.83" ${KDE_VERSION} KDE_VERSION_OK)
if(NOT KDE_VERSION_OK)
    macro_optional_find_package(Plasma)
    macro_log_feature(PLASMA_FOUND "Plasma" "Plasma libraries and header files" "http://plasma.kde.org/" FALSE "" "Plasma is needed for KMLDonkey Plasmoid")
else(NOT KDE_VERSION_OK)
    set(PLASMA_FOUND true)
    set(PLASMA_LIBS ${KDE4_PLASMA_LIBS})
endif(NOT KDE_VERSION_OK)

set(GENERIC_KMLDONKEY_VERSION "5.0.0")
set(GENERIC_KMLDONKEY_SOVERSION "5")

add_subdirectory(libkmldonkey)
add_subdirectory(kmldonkey)
if(PLASMA_FOUND)
    add_subdirectory(kmlplasma)
endif(PLASMA_FOUND)

# --- show log ---
macro_display_feature_log()

find_package(Msgfmt REQUIRED)
find_package(Gettext REQUIRED)
add_subdirectory( po )
add_subdirectory( doc-translations )
