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

add_subdirectory( configwidgets )

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/tdenetworkmanager/src/settings
  ${CMAKE_BINARY_DIR}/tdenetworkmanager/src/configwidgets
  ${CMAKE_SOURCE_DIR}/tdenetworkmanager/src/settings
  ${CMAKE_SOURCE_DIR}/tdenetworkmanager/src/configwidgets
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${DBUS_TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### headers ###################################

install( FILES
    tdenetman-plugin.h tdenetman-vpnplugin.h
  DESTINATION ${INCLUDE_INSTALL_DIR} )


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

tde_create_translated_desktop(
  SOURCE tdenetworkmanager.desktop
  DESTINATION ${XDG_APPS_INSTALL_DIR}
  PO_DIR "tdenetworkmanager-desktops"
)
tde_create_translated_desktop(
  SOURCE tdenetworkmanager.desktop
  DESTINATION ${AUTOSTART_INSTALL_DIR}
  PO_DIR "tdenetworkmanager-desktops"
)
tde_create_translated_desktop(
  SOURCE eventsrc
  DESTINATION ${DATA_INSTALL_DIR}/tdenetworkmanager
)
tde_create_translated_desktop(
  SOURCE tdenetworkmanager_plugin.desktop tdenetworkmanager_vpnplugin.desktop
  DESTINATION ${SERVICETYPES_INSTALL_DIR}
  PO_DIR "tdenetworkmanager-desktops"
)


##### tdenetman (tdeinit) #################

tde_add_tdeinit_executable( tdenetworkmanager AUTOMOC
  SOURCES
    connection_editor.ui
    vpnauthentication.ui main.cpp tdenetman.cpp tdenetman-tray.cpp
    tdenetman-cellular_device_tray.cpp
    tdenetman-wired_device_tray.cpp tdenetman-wireless_device_tray.cpp
    tdenetman-wireless_menuitem.cpp tdenetman-menuitem.cpp
    tdenetman-menu_subhead.cpp
    sha1.cpp
    tdenetman-wireless_network.cpp tdenetman-wireless_manager.cpp
    tdenetman-connection_editor.cpp
    devicetraycomponent.cpp traycomponent.cpp
    tdenetman-plugin.cpp tdenetman-vpnplugin.cpp
    tdenetman-pluginmanager.cpp tdenetman-vpnservice.cpp tdenetman-vpnmanager.cpp
    tdenetman-vpnauthenticationdialog.cpp
    vpn_tray_component.cpp
  EMBED tdenetwork-connection-configwidgets-static #tdenetwork-connection-settings-static
	LINK tdecore-shared tdeui-shared tdeutils-shared ${TDEHW_LIBRARIES} ${DBUS_TQT_LIBRARIES}

)
