#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/../srvloc
  ${CMAKE_CURRENT_SOURCE_DIR}/../../libtdevnc
  ${CMAKE_CURRENT_BINARY_DIR}/../../libtdevnc
  ${CMAKE_BINARY_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


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

tde_install_icons( krfb )

tde_create_translated_desktop(
  SOURCE krfb.desktop
  PO_DIR krfb-desktops
)

install( FILES eyes-open24.png eyes-closed24.png connection-side-image.png DESTINATION ${DATA_INSTALL_DIR}/krfb/pics )

tde_create_translated_desktop(
  SOURCE eventsrc
  DESTINATION ${DATA_INSTALL_DIR}/krfb
  PO_DIR krfb-eventsrc
)

tde_create_translated_desktop(
  SOURCE kinetd_krfb.desktop
  DESTINATION ${SERVICES_INSTALL_DIR}
  PO_DIR krfb-desktops
)


##### krfb (executable) #########################

tde_add_executable( krfb AUTOMOC
  SOURCES
    rfbcontroller.cpp xupdatescanner.cpp main.cpp connectionwidget.ui
    krfbifaceimpl.cpp krfbiface.skel trayicon.cpp connectiondialog.cpp
  LINK
    krfbconfig-static tdevncserver-static srvloc-static tdeui-shared tdeio-shared jpeg Xext pthread ${XTST_LIBRARIES}
  DESTINATION ${BIN_INSTALL_DIR}
)


##### krfbconfig (static) #######################

tde_add_library( krfbconfig STATIC_PIC AUTOMOC
  SOURCES
    configuration.cpp configuration.skel invitedialog.cpp invitation.cpp
    manageinvitations.ui personalinvitewidget.ui invitewidget.ui
    personalinvitedialog.cpp
)
