find_library() does not search in WindowsSDK folder when cmake is launched from cmd.exe
find_library() returns -NOTFOUND for libraries which are part of WindowsSDK if cmake is launched from cmd.exe. Running cmake with --debug-find shows that it does not search in WindowsSDK folder.
If I specify any of the libraries by name in target_link_libraries(), the linker successfully finds the library and everything works correctly. Therefore I think something is wrong with cmake.
I also noticed that find_library() works correctly if cmake is launched from x64 Native Tools Command Prompt.
I tried reinstalling WindowsSDK (10.0.19041.0) and cmake (3.21.2), but nothing changed.