Allow combining of Windows AppContainer (UWP) executables with native (non-UWP) libraries
To build a UWP application with CMake you need to specify the following flags, CMAKE_SYSTEM_NAME=WindowsStore CMAKE_SYSTEM_VERSION=10
. When you do this, all libraries within the project are also built as "WindowsStore" libraries (and therefore target different APIs within Windows). With XamlIslands support in Windows 1903, this is no longer a requirement (that all libraries are also built as "WindowsStore") so the option should be moved from the system variables, into options on add_executable
and add_library
(in the same way we have the add_executable(myapp WIN32)
option right now, we could have a add_executable(myapp UWP)
option). To preserve backwards compatibility we could set those options by default if CMAKE_SYSTEM_NAME == WindowsStore
and CMAKE_SYSTEM_VERSION == 10
?.