1 # Copyright (C) 2012, GENIVI Alliance, Inc.
2 # Copyright (C) 2012, BMW AG
4 # This file is part of GENIVI Project AudioManager.
6 # Contributions are licensed to the GENIVI Alliance under one or more
7 # Contribution License Agreements.
10 # This Source Code Form is subject to the terms of the
11 # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
12 # this file, You can obtain one at http://mozilla.org/MPL/2.0/.
14 # author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
16 # For further information see http://www.genivi.org/.
19 IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
20 MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
21 ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
23 FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
24 STRING(REGEX REPLACE "\n" ";" files "${files}")
25 FOREACH(file ${files})
26 MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
27 IF(EXISTS "$ENV{DESTDIR}${file}")
29 "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
30 OUTPUT_VARIABLE rm_out
31 RETURN_VALUE rm_retval
33 IF(NOT "${rm_retval}" STREQUAL 0)
34 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
35 ENDIF(NOT "${rm_retval}" STREQUAL 0)
36 ELSE(EXISTS "$ENV{DESTDIR}${file}")
37 MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
38 ENDIF(EXISTS "$ENV{DESTDIR}${file}")
41 #remove the libraries in lib
42 MESSAGE(STATUS "Removing libs")
43 execute_process(COMMAND rm -R "@CMAKE_INSTALL_PREFIX@/lib/@LIB_INSTALL_SUFFIX@")