[vlc-commits] [Git][videolan/vlc][master] meson: sapi: autodetect support on Windows

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jan 19 05:35:53 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3f4e6a87 by Johannes Kauffmann at 2023-01-19T05:09:51+00:00
meson: sapi: autodetect support on Windows

We cannot assume that the required headers and type are always present
when building for Windows. On mingw-llvm, the headers are present, but
restricted to desktop usage only. Closely mirror configure.ac, which
also performs these checks.

The difference is that we now only perform these checks when building
for Windows: configure.ac performed the checks unconditionally.

- - - - -


1 changed file:

- modules/text_renderer/meson.build


Changes:

=====================================
modules/text_renderer/meson.build
=====================================
@@ -55,8 +55,16 @@ endif
 
 # Windows SAPI text to speech
 if host_system == 'windows'
-    vlc_modules += {
-        'name' : 'sapi',
-        'sources' : files('sapi.cpp')
-    }
+    have_sapi = cpp.has_type('ISpObjectToken', prefix: '\n'.join([
+        '#include <windows.h>',
+        '#include <sapi.h>',
+        '#include <sphelper.h>'
+    ]))
+
+    if have_sapi
+        vlc_modules += {
+            'name' : 'sapi',
+            'sources' : files('sapi.cpp')
+        }
+    endif
 endif



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3f4e6a87a623919cd32bfa043ab4a096271eb049

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3f4e6a87a623919cd32bfa043ab4a096271eb049
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list