[vlc-commits] [Git][videolan/vlc][master] meson: detect zlib as a dependency

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Jul 4 12:56:27 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
85344d0c by Steve Lhomme at 2023-07-04T12:39:13+00:00
meson: detect zlib as a dependency

The pkg-config or cmake exports should be present.
It will also give us the proper include folder and defines.

- - - - -


5 changed files:

- meson.build
- modules/demux/meson.build
- modules/meta_engine/meson.build
- modules/services_discovery/meson.build
- modules/stream_filter/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -131,7 +131,7 @@ subdir('buildsystem/simd_checks')
 #
 
 # zlib library
-z_lib = cc.find_library('z', required: false)
+z_dep = dependency('zlib', required: false)
 
 # Math library
 m_lib = cc.find_library('m', required: false)


=====================================
modules/demux/meson.build
=====================================
@@ -278,7 +278,7 @@ if libebml_dep.found() and libmatroska_dep.found()
             'mp4/libmp4.c',
             '../packetizer/dts_header.c',
         ),
-        'dependencies' : [libebml_dep, libmatroska_dep, z_lib]
+        'dependencies' : [libebml_dep, libmatroska_dep, z_dep]
     }
 endif
 
@@ -295,7 +295,7 @@ vlc_modules += {
         'asf/asfpacket.c',
         'mp4/attachments.c',
     ),
-    'dependencies' : [m_lib, z_lib]
+    'dependencies' : [m_lib, z_dep]
 }
 
 
@@ -575,7 +575,7 @@ vlc_modules += {
 
     ),
     'include_directories' : include_directories('adaptive', './'),
-    'dependencies' : [socket_libs, m_lib, z_lib],
+    'dependencies' : [socket_libs, m_lib, z_dep],
     'link_with' : vlc_http_lib,
     # TODO: Add optional GCRYPT dependency!
 }


=====================================
modules/meta_engine/meson.build
=====================================
@@ -10,6 +10,6 @@ if taglib_dep.found()
     vlc_modules += {
         'name' : 'taglib',
         'sources' : files('taglib.cpp', '../demux/xiph_metadata.c'),
-        'dependencies' : [taglib_dep, z_lib]
+        'dependencies' : [taglib_dep, z_dep]
     }
 endif


=====================================
modules/services_discovery/meson.build
=====================================
@@ -9,7 +9,7 @@ vlc_modules += {
 vlc_modules += {
     'name' : 'sap',
     'sources' : files('sap.c', '../access/rtp/sdp.c'),
-    'dependencies' : [socket_libs, z_lib]
+    'dependencies' : [socket_libs, z_dep]
 }
 
 # Zeroconf services discovery


=====================================
modules/stream_filter/meson.build
=====================================
@@ -16,11 +16,11 @@ if host_system != 'windows' and not have_tvos
   }
 endif
 
-if z_lib.found()
+if z_dep.found()
   vlc_modules += {
       'name' : 'inflate',
       'sources' : files('inflate.c'),
-      'dependencies' : [z_lib]
+      'dependencies' : [z_dep]
   }
 endif
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/85344d0cb02bcea071023f27094f1e7353e3875f

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