Skip to content

Conversation

@Dargun
Copy link
Contributor

@Dargun Dargun commented Nov 14, 2025

Summary

This PR fixes a regression introduced in #33, which unintentionally broke functionality added in #34.

Details

When using:

set(CMAKE_SYSTEM_NAME WindowsStore)

the variable CMAKE_SYSTEM_PROCESSOR is always empty. Because of this, UWP builds can only rely on CMAKE_GENERATOR_PLATFORM.

This PR adds support for using both variables to cover all cases, restoring proper behavior and ensuring UWP builds work again.

Additional Improvements

  • Replaced the obsolete if(WINDOWS_STORE) condition with the correct:
    if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
  • Successfully rebuilt UWP with these changes to confirm everything works as expected.

@Dargun
Copy link
Contributor Author

Dargun commented Nov 14, 2025

It would be helpful to add a UWP build check here as well 😉

@jimmy-park
Copy link
Owner

I think CMAKE_SYSTEM_PROCESSOR should be set along with CMAKE_SYSTEM_NAME in the toolchain file.

By the way I don't know why you suggest "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" instead of the much simpler WINDOWS_STORE. And it is not obsolete.

@Dargun
Copy link
Contributor Author

Dargun commented Nov 14, 2025

I think CMAKE_SYSTEM_PROCESSOR should be set along with CMAKE_SYSTEM_NAME in the toolchain file.

I’m relying solely on Polly, and from what I understand these two definitions are sufficient:

set(CMAKE_SYSTEM_NAME WindowsStore)
set(CMAKE_SYSTEM_VERSION 10.0)

@Dargun
Copy link
Contributor Author

Dargun commented Nov 14, 2025

By the way I don't know why you suggest "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" instead of the much simpler WINDOWS_STORE. And it is not obsolete.

Yeah, sorry — I forgot that this works too. I always use "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" in my codebase, but using WINDOWS_STORE is much cleaner. 😉
i can change it back ;)

@jimmy-park
Copy link
Owner

I’m relying solely on Polly, and from what I understand these two definitions are sufficient:

set(CMAKE_SYSTEM_NAME WindowsStore)
set(CMAKE_SYSTEM_VERSION 10.0)

Setting CMAKE_SYSTEM_PROCESSOR in your toolchain file is the official way to specify the target system.
Please see the related CMake document.

https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants