include_directories (${CMAKE_SOURCE_DIR}/kbabel/common/
		${CMAKE_SOURCE_DIR}/kbabel/commonui/
                ${CMAKE_BINARY_DIR}/kbabel/commonui/
                ${CMAKE_SOURCE_DIR}/kbabel/kbabeldict/
		${CMAKE_SOURCE_DIR}/kbabel/catalogmanager/libcvs/
		${CMAKE_SOURCE_DIR}/kbabel/catalogmanager/libsvn/)
add_subdirectory( libcvs ) 
add_subdirectory( libsvn ) 
add_subdirectory( icons ) 


set(libcatalogmanagercvs_SRCS 
		libcvs/cvshandler.cpp 
		libcvs/cvsdialog.cpp
		)

set(libcatalogmanagersvn_SRCS 
		libsvn/svnhandler.cpp 
		libsvn/svndialog.cpp
		)

########### next target ###############

set(libcatalogmanager_SRCS 
		catalogmanagerview.cpp
		catalogmanager.cpp 
		findinfilesdialog.cpp
		catmanlistitem.cpp 
		multiroughtransdlg.cpp
		validateprogresswidget.cpp
		validateprogress.cpp
		validationoptions.cpp
		markpatternwidget.cpp
		markpatterndialog.cpp
		)


########### next target ###############

set(catalogmanager_SRCS main.cpp ${libcatalogmanagercvs_SRCS} ${libcatalogmanagersvn_SRCS} ${libcatalogmanager_SRCS} )
qt4_add_dbus_adaptor( catalogmanager_SRCS org.kde.kbabel.catalogmanager.xml catalogmanagerapp.h CatalogManagerInterface )
qt4_add_dbus_adaptor( catalogmanager_SRCS ${CMAKE_SOURCE_DIR}/kbabel//kbabeldict/org.kde.kbabel.kbabeldict.xml ${CMAKE_SOURCE_DIR}/kbabel//kbabeldict/kbabeldictbox.h KBabelDictBox)

QT4_ADD_DBUS_INTERFACE(catalogmanager_SRCS ${CMAKE_SOURCE_DIR}/kbabel/kbabel/org.kde.kbabel.kbabel.xml kbabel_interface )

kde4_add_ui_files(catalogmanager_SRCS
                validateprogresswidget.ui
                validationoptions.ui
                markpatternwidget.ui
                )




kde4_add_executable(catalogmanager ${catalogmanager_SRCS} )

target_link_libraries(catalogmanager  ${KDE4_KDE3SUPPORT_LIBS} kbabelcommon ${KDE4_KTEXTEDITOR_LIBS} kbabeldictplugin kbabelcommonui)

install(TARGETS catalogmanager  DESTINATION ${BIN_INSTALL_DIR} )


########### install files ###############

install( FILES catalogmanager.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
install( FILES catalogmanagerui.rc  DESTINATION  ${DATA_INSTALL_DIR}/catalogmanager )
install( FILES org.kde.kbabel.catalogmanager.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )

kde4_install_icons( ${ICON_INSTALL_DIR}   )

