[vlc-commits] [Git][videolan/vlc][master] meson: fix error when the contrib include folder is within the source tree

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 21 17:59:30 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
100752eb by Steve Lhomme at 2024-11-21T17:46:26+00:00
meson: fix error when the contrib include folder is within the source tree

See https://code.videolan.org/videolan/vlc/-/blob/d689072f0de51a933ba3a1de248cabcb4b19d207/meson.build#L70
and https://github.com/mesonbuild/meson/pull/1386#issuecomment-1353858080

- - - - -


3 changed files:

- modules/codec/meson.build
- modules/demux/meson.build
- modules/hw/nvdec/meson.build


Changes:

=====================================
modules/codec/meson.build
=====================================
@@ -107,11 +107,10 @@ mad_dep = disabler()
 # TODO add support for a custom folder for libmad
 if cc.check_header('mad.h')
     mad_dep = cc.find_library('mad')
-elif cc.check_header('mad.h', include_directories: include_directories( contrib_incdir ) )
+elif cc.check_header('mad.h', dependencies: contrib_dep )
     if cc.find_library('mad', dirs: contrib_libdir).found()
         mad_dep = declare_dependency(
-            dependencies: [cc.find_library('mad', dirs: contrib_libdir)],
-            include_directories: [include_directories( contrib_incdir )])
+            dependencies: [cc.find_library('mad', dirs: contrib_libdir), contrib_dep])
     endif
 endif
 endif


=====================================
modules/demux/meson.build
=====================================
@@ -389,11 +389,10 @@ mpc_dep = disabler()
 if cc.check_header('mpc/mpcdec.h')
     mpc_dep = cc.find_library('mpcdec')
     cdata.set('HAVE_MPC_MPCDEC_H', 1)
-elif cc.check_header('mpc/mpcdec.h', include_directories: include_directories( contrib_incdir ) )
+elif cc.check_header('mpc/mpcdec.h', dependencies: contrib_dep )
     if cc.find_library('mpcdec', dirs: contrib_libdir).found()
         mpc_dep = declare_dependency(
-            dependencies: [cc.find_library('mpcdec', dirs: contrib_libdir)],
-            include_directories: [include_directories( contrib_incdir )])
+            dependencies: [cc.find_library('mpcdec', dirs: contrib_libdir), contrib_dep])
         cdata.set('HAVE_MPC_MPCDEC_H', 1)
     endif
 endif


=====================================
modules/hw/nvdec/meson.build
=====================================
@@ -2,9 +2,8 @@ if get_option('nvdec').allowed()
 nvdec_dep = disabler()
 if cc.check_header('ffnvcodec/dynlink_loader.h')
     nvdec_dep = enabler()
-elif cc.check_header('ffnvcodec/dynlink_loader.h', include_directories: include_directories( contrib_incdir ) )
-    nvdec_dep = declare_dependency(
-        include_directories: [include_directories( contrib_incdir )])
+elif cc.check_header('ffnvcodec/dynlink_loader.h', dependencies: contrib_dep )
+    nvdec_dep = contrib_dep
 endif
 endif
 vlc_modules += {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/100752eb853f705087f96e5d10cdec069ffe4e4b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/100752eb853f705087f96e5d10cdec069ffe4e4b
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