cmake_uninstall.cmake.in
author Ryan C. Gordon <icculus@icculus.org>
Mon, 20 Apr 2015 12:22:44 -0400
changeset 9566 7454bfce9202
parent 8874 48d4f2d74d67
permissions -rw-r--r--
Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8874
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     1
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     2
    message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     3
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     4
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     5
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     6
string(REGEX REPLACE "\n" ";" files "${files}")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     7
foreach (file ${files})
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     8
    message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
     9
    execute_process(
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    10
        COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    11
        OUTPUT_VARIABLE rm_out
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    12
        RESULT_VARIABLE rm_retval
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    13
    )
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    14
    if(NOT ${rm_retval} EQUAL 0)
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    15
        message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    16
    endif (NOT ${rm_retval} EQUAL 0)
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    17
endforeach(file)
48d4f2d74d67 Add suport for "make uninstall" to cmake.
Wander Lairson Costa <wander.lairson@gmail.com>
parents:
diff changeset
    18