Warning, /multimedia/kwave/cmake/uninstall.cmake.in is written in an unsupported language. File is not indexed.

0001 #############################################################################
0002 ##    Kwave                - cmake/uninstall.cmake.in
0003 ##                           -------------------
0004 ##    begin                : Sat May 26 2007
0005 ##    copyright            : (C) 2007 by Thomas Eschenbacher
0006 ##    email                : Thomas.Eschenbacher@gmx.de
0007 ##
0008 ##    based on             : cmake_uninstall.cmake.in from KDE
0009 ##
0010 #############################################################################
0011 #
0012 #############################################################################
0013 #                                                                           #
0014 # Redistribution and use in source and binary forms, with or without        #
0015 # modification, are permitted provided that the following conditions        #
0016 # are met:                                                                  #
0017 #                                                                           #
0018 # 1. Redistributions of source code must retain the above copyright         #
0019 #    notice, this list of conditions and the following disclaimer.          #
0020 # 2. Redistributions in binary form must reproduce the above copyright      #
0021 #    notice, this list of conditions and the following disclaimer in the    #
0022 #    documentation and/or other materials provided with the distribution.   #
0023 #                                                                           #
0024 # For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file.        #
0025 #                                                                           #
0026 #############################################################################
0027 
0028 # check if the install_manifest exists
0029 IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
0030     MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
0031 ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
0032 
0033 # read in the install_manifest and convert it into a list
0034 FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
0035 STRING(REGEX REPLACE "\n" ";" files "${files}")
0036 SET(files "${files}$ENV{EXTRA_UNINSTALL_FILES}")
0037 
0038 # loop over all files
0039 FOREACH(_file ${files})
0040     # convert into absolute filename and prepend $DESTDIR
0041     GET_FILENAME_COMPONENT(_file ${_file} ABSOLUTE)
0042     SET(_file $ENV{DESTDIR}/${_file})
0043 
0044     # uninstall the file
0045     MESSAGE(STATUS "Uninstalling \"${_file}\"")
0046     EXEC_PROGRAM(
0047         "@CMAKE_COMMAND@" ARGS "-E remove \"${_file}\""
0048         OUTPUT_VARIABLE _rm_out
0049         RETURN_VALUE _rm_retval
0050     )
0051     # complain only if the file still exists
0052     IF (EXISTS "${_file}")
0053         IF(NOT "${_rm_retval}" STREQUAL 0)
0054             MESSAGE(FATAL_ERROR "Problem when removing \"${_file}\"")
0055         ENDIF(NOT "${_rm_retval}" STREQUAL 0)
0056     ENDIF(EXISTS "${_file}")
0057 
0058     # clean up remainig empty directories
0059     GET_FILENAME_COMPONENT(_dirname ${_file} PATH)
0060     EXEC_PROGRAM(
0061         "@RMDIR_EXECUTABLE@"
0062         ARGS "--parents \"${_dirname}\""
0063         OUTPUT_VARIABLE _rmdir_out
0064     )
0065 
0066 ENDFOREACH(_file)
0067 
0068 #############################################################################
0069 #############################################################################