#################################################
#
#  (C) 2012 Golubev Alexander
#  fatzer2 (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

add_subdirectory( config )
add_subdirectory( linkaddressbook )
add_subdirectory( blowfish )

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}/config
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/config
  ${CMAKE_CURRENT_SOURCE_DIR}/linkaddressbook
  ${CMAKE_CURRENT_SOURCE_DIR}/blowfish
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### konversation (executable) #################

tde_add_executable( konversation AUTOMOC
  SOURCES konviface.skel konviconfigdialog.cpp konversationstatusbar.cpp
    konvisettingsdialog.cpp viewcontainer.cpp viewtree.cpp viewtreeitem.cpp
    konversationmainwindow.cpp valuelistviewitem.cpp urlcatcher.cpp
    scriptlauncher.cpp rawlog.cpp konvdcop.cpp channellistpanel.cpp
    konsolepanel.cpp identity.cpp statuspanel.cpp dccrecipientdialog.cpp
    topiccombobox.cpp nicksonline.cpp dcctransferpanel.cpp
    dcctransferpanelitem.cpp highlight.cpp highlightviewitem.cpp modebutton.cpp
    ignore_preferencesui.ui ignore_preferences.cpp ignore.cpp nicklistview.cpp
    ircinput.cpp channeloptionsui.ui channeloptionsdialog.cpp
    ignorelistviewitem.cpp images.cpp quickbutton.cpp chatwindow.cpp
    outputfilter.cpp logfilereader.cpp query.cpp konversationapplication.cpp
    nick.cpp inputfilter.cpp channel.cpp ircview.cpp server.cpp main.cpp
    dcc_preferencesui.ui log_preferences.ui tabs_preferencesui.ui
    tabs_preferences.cpp chatwindowappearance_preferences.ui
    irccolorchooserui.ui colorsappearance_preferences.ui irccolorchooser.cpp
    channellistviewitem.cpp osd.cpp trayicon.cpp dccchat.cpp multilineedit.cpp
    nickinfo.cpp dccresumedialog.cpp konversationsound.cpp
    quickconnectdialog.cpp serverlistdialog.cpp dcctransfersend.cpp
    dcctransferrecv.cpp channelnick.cpp insertchardialog.cpp irccharsets.cpp
    editnotifydialog.cpp common.cpp serverison.cpp sslsocket.cpp
    servergroupsettings.cpp serversettings.cpp servergroupdialog.cpp
    ssllabel.cpp serverdialog.cpp channeldialog.cpp identitydialog.cpp
    topiclabel.cpp notificationhandler.cpp joinchannelui.ui
    joinchanneldialog.cpp emoticon.cpp chatwindowbehaviour_preferences.ui
    alias_preferencesui.ui osd_preferencesui.ui theme_preferencesui.ui
    highlight_preferencesui.ui warnings_preferencesui.ui
    warnings_preferences.cpp quickbuttons_preferencesui.ui
    watchednicknames_preferencesui.ui generalbehavior_preferences.ui
    connectionbehavior_preferences.ui fontappearance_preferences.ui
    nicklistbehavior_preferencesui.ui konvibookmarkhandler.cpp
    konvibookmarkmenu.cpp ircviewbox.cpp searchbar.cpp osd_preferences.cpp
    theme_preferences.cpp dcc_preferences.cpp alias_preferences.cpp
    highlight_preferences.cpp watchednicknames_preferences.cpp
    quickbuttons_preferences.cpp nicklistbehavior_preferences.cpp
    tabnotifications_preferences.ui multilinetextedit.cpp serverlistview.cpp
    nicksonlineitem.cpp searchbarbase.ui autoreplace_preferencesui.ui
    autoreplace_preferences.cpp servergroupdialogui.ui dcctransfer.cpp
    dcctransfermanager.cpp dcctransferdetailedinfopanelui.ui
    dcctransferdetailedinfopanel.cpp dcccommon.cpp queuetunerbase.ui
    queuetuner.cpp ircqueue.cpp connectionsettings.cpp connectionmanager.cpp
    awaymanager.cpp
  LINK linkaddressbookui-static konversationconfig-static blowfish-static 
    tdeio-shared tdeabc-shared tdeimproxy-shared ${XSCREENSAVER_LIBRARIES}
  DESTINATION ${BIN_INSTALL_DIR}
)


##### other data ################################

install( FILES konversationui.rc eventsrc
  DESTINATION ${DATA_INSTALL_DIR}/konversation
)

install( PROGRAMS
    konversation-0.19-colors.pl 
    konversation-0.19-sortorder.pl 
    konversation-0.19-appearance.pl 
    konversation-0.19-tabplacement.pl 
    konversation-0.19-custombrowser.pl 
    konversation-0.19-colorcodes.pl 
    konversation-0.19-notifylists.pl 
    konversation-0.20-quickbuttons.pl 
    konversation-0.20-customfonts.pl
  DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
)

install( FILES konversation.desktop
  DESTINATION ${XDG_APPS_INSTALL_DIR}
)

install( FILES konvirc.protocol konvirc6.protocol
  DESTINATION ${SERVICES_INSTALL_DIR}
)

install( FILES konversation.upd
  DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
)

