I recently added support for this pragma to Wine widl, so that there is no longer need to pass -winrt (aka. --rt, which I renamed for midl compatibility). This way no build system changes are needed to support winrt IDL files (although widl is not yet ready to handle them). This will take effect when recent Wine widl is merged to mingw-w64, but widl ignores unknown pragmas, so there is no reason to wait with this patch.
--- mingw-w64-headers/include/windows.foundation.idl | 4 ++++ mingw-w64-headers/include/windows.security.cryptography.idl | 4 ++++ mingw-w64-headers/include/windows.storage.idl | 4 ++++ mingw-w64-headers/include/windows.storage.streams.idl | 4 ++++ mingw-w64-headers/include/windows.system.threading.idl | 4 ++++ 5 files changed, 20 insertions(+)
diff --git a/mingw-w64-headers/include/windows.foundation.idl b/mingw-w64-headers/include/windows.foundation.idl index 875341a..a8499dc 100644 --- a/mingw-w64-headers/include/windows.foundation.idl +++ b/mingw-w64-headers/include/windows.foundation.idl @@ -4,6 +4,10 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#ifdef __WIDL__ +#pragma winrt +#endif + import "inspectable.idl"; namespace Windows { diff --git a/mingw-w64-headers/include/windows.security.cryptography.idl b/mingw-w64-headers/include/windows.security.cryptography.idl index cac6daf..bc64ba2 100644 --- a/mingw-w64-headers/include/windows.security.cryptography.idl +++ b/mingw-w64-headers/include/windows.security.cryptography.idl @@ -4,6 +4,10 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#ifdef __WIDL__ +#pragma winrt +#endif + import "inspectable.idl"; import "windows.storage.streams.idl"; diff --git a/mingw-w64-headers/include/windows.storage.idl b/mingw-w64-headers/include/windows.storage.idl index 16e7e2b..4246e4a 100644 --- a/mingw-w64-headers/include/windows.storage.idl +++ b/mingw-w64-headers/include/windows.storage.idl @@ -4,6 +4,10 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#ifdef __WIDL__ +#pragma winrt +#endif + import "inspectable.idl"; import "hstring.idl"; import "windows.foundation.idl"; diff --git a/mingw-w64-headers/include/windows.storage.streams.idl b/mingw-w64-headers/include/windows.storage.streams.idl index 57b706f..9e277f6 100644 --- a/mingw-w64-headers/include/windows.storage.streams.idl +++ b/mingw-w64-headers/include/windows.storage.streams.idl @@ -4,6 +4,10 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#ifdef __WIDL__ +#pragma winrt +#endif + import "inspectable.idl"; namespace Windows { diff --git a/mingw-w64-headers/include/windows.system.threading.idl b/mingw-w64-headers/include/windows.system.threading.idl index 2fafee5..c17a9eb 100644 --- a/mingw-w64-headers/include/windows.system.threading.idl +++ b/mingw-w64-headers/include/windows.system.threading.idl @@ -4,6 +4,10 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#ifdef __WIDL__ +#pragma winrt +#endif + import "inspectable.idl"; import "windows.foundation.idl";
------------------------------------------------------------------------------
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public