#=============================================================================
#  Mscore
#  Linux Music Score Editor
#  $Id:$
#
#  Copyright (C) 2002-2006 by Werner Schweer and others
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License version 2.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================

add_custom_command (
      OUTPUT man-de.pdf
      DEPENDS
            ${CMAKE_CURRENT_SOURCE_DIR}/man-de.tex
      COMMAND ${TEXEXEC_PATH}/texexec
      ARGS  --language=de --verbose --batch --pdf
            --path=${CMAKE_CURRENT_SOURCE_DIR}
            --result=man-de.pdf
            ${CMAKE_CURRENT_SOURCE_DIR}/man-de.tex
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
      )

add_custom_target ( man
      DEPENDS man-de.pdf
      )

install (
   FILES ${CMAKE_CURRENT_BINARY_DIR}/man-de.pdf
   DESTINATION share/${Mscore_INSTALL_NAME}/doc/
   OPTIONAL
   )

set (extraClean man-de.log man-de.tmp man-de.tuo man-de.tui
   man-de-mpgraph.mp mpgraph.mp )

set_directory_properties( PROPERTIES
   ADDITIONAL_MAKE_CLEAN_FILES "${extraClean}"
   )

configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/figurepath.tex.in
   ${CMAKE_CURRENT_BINARY_DIR}/figurepath.tex
   )

