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

install( PROGRAMS
    create_makefile create_makefiles adddebug cheatmake makeobj kde-build
    build-progress.sh pruneemptydirs cvsbackport cvsversion cvscheck
    cvslastchange cvslastlog cvsrevertlast noncvslist cvs-clean cvs2dist
    cvsblame cvsforwardport create_cvsignore colorsvn create_svnignore
    nonsvnlist svn2dist svnaddcurrentdir svnbackport svnforwardport
    svn-clean svngettags svnlastchange svnlastlog svnrevertlast
    svnversions svnchangesince findmissingcrystal tdesvn-build
    kdedoc qtdoc extractrc extractattr zonetab2pot.py licensecheck
    fixkdeincludes fixuifiles includemocs cxxmetric extend_dmalloc
    kdekillall kdelnk2desktop.py package_crystalsvg png2mng.pl
    kdemangen.pl
  DESTINATION ${BIN_INSTALL_DIR} )


install( FILES
    tdesvn-buildrc.xml
  DESTINATION ${DATA_INSTALL_DIR}/katepart/syntax )


macro( _pod2man )
  foreach( _pod ${ARGN} )
    add_custom_command(
      OUTPUT ${_pod}.1
      COMMAND pod2man ${CMAKE_CURRENT_SOURCE_DIR}/${_pod} > ${_pod}.1
      DEPENDS ${_pod} )
    add_custom_target( "${_pod}-man" ALL DEPENDS ${_pod}.1 )
    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pod}.1 DESTINATION ${MAN_INSTALL_DIR}/man1 )
  endforeach( )
endmacro()

_pod2man( kde-build tdesvn-build cvsversion cvscheck noncvslist cvsblame includemocs )
