if(UWP_LIB AND NOT TARGET SDL2::SDL2-static)
  set(SDL_BUILD_TYPE "Release")

  if(CMAKE_BUILD_TYPE MATCHES "Debug")
    set(SDL_BUILD_TYPE "Debug")
  endif()

  set(SDL2_LIBRARY "${UWP_SDL2_DIR}/VisualC-WinRT/x64/${SDL_BUILD_TYPE}/SDL-UWP")
  set(SDL2_INCLUDE_DIR "${UWP_SDL2_DIR}/include")
  add_library(SDL2_lib STATIC IMPORTED)
  set_property(TARGET SDL2_lib PROPERTY IMPORTED_LOCATION "${SDL2_LIBRARY}/SDL2.lib")
  set_property(TARGET SDL2_lib PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR})
  add_library(SDL2::SDL2-static ALIAS SDL2_lib)
  mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY)
  set(SDL2_LIBRARIES ${SDL2_LIBRARY})
  set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
endif()
