diff options
author | christian mueller <christian.ei.mueller@bmw.de> | 2012-01-12 17:26:10 +0100 |
---|---|---|
committer | christian mueller <christian.ei.mueller@bmw.de> | 2012-01-12 17:26:10 +0100 |
commit | a4a4c50ff375d94fa90c13d293b145176f214bf4 (patch) | |
tree | 26e5f80d2071f272a622085e13c46edbe84e9f4a /cmake/cmake_uninstall.cmake.in | |
parent | 915ae08fa586cfa67559cc94a72ac5787df909ea (diff) | |
download | audiomanager-a4a4c50ff375d94fa90c13d293b145176f214bf4.tar.gz |
* added install and uninstall routines to make
Diffstat (limited to 'cmake/cmake_uninstall.cmake.in')
-rwxr-xr-x | cmake/cmake_uninstall.cmake.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in new file mode 100755 index 0000000..17376d2 --- /dev/null +++ b/cmake/cmake_uninstall.cmake.in @@ -0,0 +1,22 @@ +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + IF(EXISTS "$ENV{DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSE(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + ENDIF(EXISTS "$ENV{DESTDIR}${file}") +ENDFOREACH(file) + |