SDL2: "/usr/lib/libSDL2.a" does not exist when using CMake
When using CMake with the following dummy CMakeLists.txt:
cmake_minimum_required(VERSION 3.9.0)
find_package(SDL2 REQUIRED)
CMake displays the following error:
CMake Error at /usr/lib/cmake/SDL2/SDL2Targets.cmake:97 (message):
The imported target "SDL2::SDL2-static" references the file
"/usr/lib/libSDL2.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/SDL2/SDL2Targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/cmake/SDL2/SDL2Config.cmake:1 (include)
CMakeLists.txt:3 (find_package)
Edited by Ho Tuan Kiet