sdl2-config.cmake.in
author Sam Lantinga <slouken@libsdl.org>
Thu, 12 Oct 2017 08:44:45 -0700
changeset 11605 b914622c734e
parent 10474 e723c663ba58
permissions -rw-r--r--
Fixed bug 3867 - Can't find install_manifest.txt when running 'uninstall' target

Steve Robinson

When I try to build the 'uninstall' target in CMake when SDL2 is added to a subdirectory of my project, I get this error:

1>CMake Error at cmake_uninstall.cmake:2 (message):
1> Cannot find install manifest:
1> "D:/Code/sdl2-tutorial/_build/3rdparty/SDL2/SDL2-2.0.6/install_manifest.txt"

The install_manifest.txt is actually in the top-level binary directory, not the project-specific binary directory.

To fix it, change all instances of:
CMAKE_CURRENT_BINARY_DIR

To:
CMAKE_BINARY_DIR

In:
cmake_uninstall.cmake.in
     1 # sdl2 cmake project-config input for ./configure scripts
     2 
     3 set(prefix "@prefix@") 
     4 set(exec_prefix "@exec_prefix@")
     5 set(libdir "@libdir@")
     6 set(SDL2_PREFIX "@prefix@")
     7 set(SDL2_EXEC_PREFIX "@prefix@")
     8 set(SDL2_LIBDIR "@libdir@")
     9 set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")
    10 set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
    11 string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)