cmake_uninstall.cmake.in
author Sylvain Becker <sylvain.becker@gmail.com>
Thu, 03 Jan 2019 23:22:50 +0100
changeset 12499 e6130a4cca7a
parent 11605 b914622c734e
permissions -rw-r--r--
Android: concurrency issue with egl_surface EGL_BAD_SURFACE - (bug 4142)

Occurs when application goes to background:
- Java activity is destroying SurfaceView holder and "egl_surface" (in onNativeSurfaceDestroyed())
- While native thread is in Android_GLES_SwapWindow(), prepared to call SDL_EGL_SwapBuffers()

The error is "call to eglSwapBuffers failed, reporting an error of EGL_BAD_SURFACE"

It an be reproduced easily by adding a SDL_Delay(100) at the begining of SDL_EGL_SwapBuffers(),
and putting the application into background.
slouken@11605
     1
if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
slouken@11605
     2
    message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
slouken@11605
     3
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
wander@8874
     4
slouken@11605
     5
file(READ "@CMAKE_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