wander@8874: if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") wander@8874: message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") wander@8874: endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") wander@8874: wander@8874: file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) wander@8874: string(REGEX REPLACE "\n" ";" files "${files}") wander@8874: foreach (file ${files}) wander@8874: message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") wander@8874: execute_process( wander@8874: COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" wander@8874: OUTPUT_VARIABLE rm_out wander@8874: RESULT_VARIABLE rm_retval wander@8874: ) wander@8874: if(NOT ${rm_retval} EQUAL 0) wander@8874: message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") wander@8874: endif (NOT ${rm_retval} EQUAL 0) wander@8874: endforeach(file) wander@8874: