cmake_uninstall.cmake.in
author David Ludwig <dludwig@pobox.com>
Sat, 20 Aug 2016 13:46:45 -0400
changeset 10277 29d7289e9055
parent 8874 48d4f2d74d67
permissions -rw-r--r--
WinRT: fixed bug where Win10 GameBar, when shown + hidden, might not restore a cursor's hidden state

The repro steps were this:
1. run an sdl2 winrt/uwp app, on Win10, v10.0.10586.0 or higher
2. hide the cursor, via a call to SDL_ShowCursor(0)
3. make the Win10 game bar appear, by pressing the Windows + G hotkey
4. observe that the mouse cursor appears, in order to interact with the
game bar (this is expected behavior)
5. make the Win10 game bar disappear, either by pressing the Windows + G hotkey
again, or clicking somewhere in the app

EXPECTED RESULT: cursor disappears, as game bar disappears

ACTUAL RESULT: cursor didn't always disappear
wander@8874
     1
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
wander@8874
     2
    message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
wander@8874
     3
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
wander@8874
     4
wander@8874
     5
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
wander@8874
     6
string(REGEX REPLACE "\n" ";" files "${files}")
wander@8874
     7
foreach (file ${files})
wander@8874
     8
    message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
wander@8874
     9
    execute_process(
wander@8874
    10
        COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
wander@8874
    11
        OUTPUT_VARIABLE rm_out
wander@8874
    12
        RESULT_VARIABLE rm_retval
wander@8874
    13
    )
wander@8874
    14
    if(NOT ${rm_retval} EQUAL 0)
wander@8874
    15
        message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
wander@8874
    16
    endif (NOT ${rm_retval} EQUAL 0)
wander@8874
    17
endforeach(file)
wander@8874
    18