[vlc-commits] [Git][videolan/vlc][master] 4 commits: meson: do not use opengl_dep on Windows if glew.h is missing

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 10 06:47:44 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
649f80e1 by Steve Lhomme at 2023-02-10T06:30:25+00:00
meson: do not use opengl_dep on Windows if glew.h is missing

- - - - -
8afa82d3 by Steve Lhomme at 2023-02-10T06:30:25+00:00
meson: don't compile OpenGL code on Windows if glew.h is missing

It won't compile.

- - - - -
82c75ef0 by Steve Lhomme at 2023-02-10T06:30:25+00:00
meson: allow using opengl without libplacebo

- - - - -
8c46cfc2 by Steve Lhomme at 2023-02-10T06:30:25+00:00
meson: define X_DISPLAY_MISSING once

disabler() also supports found() and will return false.

- - - - -


4 changed files:

- meson.build
- modules/video_output/meson.build
- modules/video_output/opengl/meson.build
- modules/video_output/win32/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -189,11 +189,10 @@ if (get_option('x11')
     .disable_auto_if(host_system in ['darwin', 'windows'])
     .allowed())
     x11_dep = dependency('x11', required: get_option('x11'))
-    if not x11_dep.found()
-        cdata.set('X_DISPLAY_MISSING', 1)
-    endif
 else
     x11_dep = disabler()
+endif
+if not x11_dep.found()
     cdata.set('X_DISPLAY_MISSING', 1)
 endif
 


=====================================
modules/video_output/meson.build
=====================================
@@ -4,10 +4,24 @@
 
 # Declared here, as its used by both the
 # libplacebo and opengl subfolder build file.
+if have_win_store
+    # even if it's there, don't use it
+    missing_win_glew = true
+elif host_system == 'windows'
+    missing_win_glew = not cdata.has('HAVE_GL_WGLEW_H')
+else
+    missing_win_glew = false
+endif
+
 libplacebo_dep = dependency('libplacebo',
                             version: '>= 2.72',
                             required: get_option('libplacebo'))
-opengl_dep = dependency('gl', required: false)
+if missing_win_glew
+    # Our OpenGL code requires glew.h to be present
+    opengl_dep = disabler()
+else
+    opengl_dep = dependency('gl', required: false)
+endif
 opengles2_dep = dependency('glesv2', required: get_option('gles2'))
 
 if host_system == 'darwin'
@@ -20,9 +34,11 @@ if libplacebo_dep.found()
                                   dependencies: [libplacebo_dep],
                                   include_directories: [vlc_include_dirs])
 
-    subdir('opengl')
     subdir('libplacebo')
+else
+    libplacebo_utils = []
 endif
+subdir('opengl')
 
 if host_system == 'windows'
     subdir('win32')


=====================================
modules/video_output/opengl/meson.build
=====================================
@@ -70,7 +70,7 @@ endif
 # interop_dxva2
 if have_win_desktop
     opengl32_lib = cc.find_library('opengl32', required: false)
-    if opengl32_lib.found()
+    if opengl32_lib.found() and not missing_win_glew
         vlc_modules += {
             'name' : 'interop_dxva2',
             'sources' : files('interop_dxva2.c'),


=====================================
modules/video_output/win32/meson.build
=====================================
@@ -37,7 +37,7 @@ if have_win_desktop
     }
 
     opengl32_lib = cc.find_library('opengl32', required: false)
-    if opengl32_lib.found()
+    if opengl32_lib.found() and not missing_win_glew
         # glwin32
         vlc_modules += {
             'name' : 'glwin32',



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da353484850ce6c57fb8ddce6345cbdeb8aadb00...8c46cfc25b8104b1fb9bfc2373f9f39cc6b48233

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da353484850ce6c57fb8ddce6345cbdeb8aadb00...8c46cfc25b8104b1fb9bfc2373f9f39cc6b48233
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