SDL_image build static libs (VS2019)


I build static SDL2 libs via cmake and vs2019 without problems (SDL2-static.lib, SDL2-staticd.lib etc.) and it’s working fine in project, but I have no luck with building static SDL_image, SDL_ttf and so. I just set path to SDL2 and get bunch of errors like:

CMake Error at C:/DEV-CPP/SDL2/SDL/SDL2Config.cmake:22 (get_target_property):
get_target_property() called with non-existent target “SDL2::SDL2”.
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)

cmake settings -
Full output - Paste ofCode

I tried figure out what is going on, but all this cmake stuff is deep jungle for me. I’m using premake in my projects. Thank you for any advice.

I get it working through editing existing VisualC/SDL_image.sln and building all dependencies as libs. It’s bit weird, you can build static SDL2 fast, but components like sdl_image and all their dependencies are still based on DLL’s.