Skip to content

Commit

Permalink
detect winstore builds with a regular mingw32 toolchain
Browse files Browse the repository at this point in the history
It's trigerred with a mingw32winrt or mingw32uwp toolchain.

Forcing the WINAPI_FAMILY should be enough to trigger the winstore mode.
  • Loading branch information
robUx4 authored and lu-zero committed May 28, 2020
1 parent 367931b commit c51a54c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ AS_CASE([${host_os}],
AM_CONDITIONAL([WINDOWS_STORE], [true])
DLLIB="$(DLLIB) -ldxgi"
],
[mingw32], [
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
[[#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
# error Win32 Desktop build
#endif
]],[[;]])
],[
AM_CONDITIONAL([WINDOWS_STORE], [true])
DLLIB="$(DLLIB) -ldxgi"
],[
AM_CONDITIONAL([WINDOWS_STORE], [false])
])
],
[
AM_CONDITIONAL([WINDOWS_STORE], [false])
]
Expand Down

0 comments on commit c51a54c

Please sign in to comment.