Applied the CMake changes to those targets not built by Windows.