find_package(SDL2 REQUIRED)
, ругается Error:Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
. Что ему нужно? set(SDL2_PATH "C:\\SDL2-2.0.5\\x86_64-w64-mingw32") # ПУТЬ К ВАШЕЙ SDL БИБЛИОТЕКЕ
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${ИМЯ_ПРОЕКТА_SOURCE_DIR}/cmake")
find_package(SDL2 REQUIRED)
find_package(SDL2_Image REQUIRED)
find_package(SDL2_ttf REQUIRED)
include_directories(${SDL2_INCLUDE_DIR}
${SDL2_IMAGE_INCLUDE_DIR}
${SDL2_TTF_INCLUDE_DIR})
target_link_libraries(ИМЯ_ПРОЕКТА ${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARIES}
${SDL2_TTF_LIBRARIES})