
add_subdirectory( Icons )

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_SOURCE_DIR}/lib
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### palmdoc (static) ##########################

tde_add_library( palmdoc STATIC_PIC AUTOMOC
  SOURCES makedoc9.cpp pilotDOCHead.cpp
    pilotDOCEntry.cpp pilotDOCBookmark.cpp
    DOC-converter.cpp
)


##### kpalmdoc (executable) #####################

tde_add_executable( kpalmdoc AUTOMOC
  SOURCES kpalmdocSettings.kcfgc kpalmdoc_dlgbase.ui kpalmdoc_dlg.cpp
    kpalmdoc.cpp
  LINK tdecore-shared tdeui-shared tdeio-shared kpilot-shared palmdoc-static
  DESTINATION ${BIN_INSTALL_DIR}
)


##### conduit_doc (kpart) #######################

tde_add_kpart( conduit_doc AUTOMOC
  SOURCES docconduitSettings.kcfgc doc-factory.cpp doc-setup.cpp doc-conduit.cpp
    doc-setupdialog.ui doc-conflictdialog.cpp
  LINK kpilot-shared tdeui-shared palmdoc-static
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


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

tde_create_translated_desktop(
  SOURCE kpalmdoc.desktop
  DESTINATION ${XDG_APPS_INSTALL_DIR}
)

install( FILES kpalmdoc.upd
  DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update
)

tde_create_translated_desktop(
  SOURCE doc_conduit.desktop
  DESTINATION ${SERVICES_INSTALL_DIR}
)

install( FILES docconduit.kcfg kpalmdoc.kcfg
  DESTINATION ${KCFG_INSTALL_DIR}
)
