[2/2] meson: Use dependency('dl')
diff mbox series

Message ID 20250818144531.6406-2-laurent.pinchart@ideasonboard.com
State Accepted
Commit 392e9044b1f6f91b3fff465c7cdbc475b323a920
Headers show
Series
  • [1/2] meson: Bump minimum version to v1.0.1
Related show

Commit Message

Laurent Pinchart Aug. 18, 2025, 2:45 p.m. UTC
Support for locating libdl through dependency('dl') was broken before
meson v0.62.0. Now that we require a newer version, drop the hack and
use the dependency() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/meson.build | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Kieran Bingham Aug. 18, 2025, 2:53 p.m. UTC | #1
Quoting Laurent Pinchart (2025-08-18 15:45:31)
> Support for locating libdl through dependency('dl') was broken before
> meson v0.62.0. Now that we require a newer version, drop the hack and
> use the dependency() function.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/libcamera/meson.build | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index de1eb99b28fd..b3ca27f217da 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -76,13 +76,7 @@ subdir('proxy')
>  subdir('sensor')
>  subdir('software_isp')
>  
> -null_dep = dependency('', required : false)
> -
> -# TODO: Use dependency('dl') when updating to meson 0.62.0 or newer.

Looks like a good time ;-)

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> -libdl = null_dep
> -if not cc.has_function('dlopen')
> -    libdl = cc.find_library('dl')
> -endif
> +libdl = dependency('dl')
>  libudev = dependency('libudev', required : get_option('udev'))
>  libyaml = dependency('yaml-0.1', default_options : [
>      'default_library=static',
> -- 
> Regards,
> 
> Laurent Pinchart
>
Barnabás Pőcze Aug. 18, 2025, 3 p.m. UTC | #2
2025. 08. 18. 16:45 keltezéssel, Laurent Pinchart írta:
> Support for locating libdl through dependency('dl') was broken before
> meson v0.62.0. Now that we require a newer version, drop the hack and
> use the dependency() function.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   src/libcamera/meson.build | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index de1eb99b28fd..b3ca27f217da 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -76,13 +76,7 @@ subdir('proxy')
>   subdir('sensor')
>   subdir('software_isp')
>   
> -null_dep = dependency('', required : false)
> -
> -# TODO: Use dependency('dl') when updating to meson 0.62.0 or newer.
> -libdl = null_dep
> -if not cc.has_function('dlopen')
> -    libdl = cc.find_library('dl')
> -endif
> +libdl = dependency('dl')
>   libudev = dependency('libudev', required : get_option('udev'))
>   libyaml = dependency('yaml-0.1', default_options : [
>       'default_library=static',

Patch
diff mbox series

diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index de1eb99b28fd..b3ca27f217da 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -76,13 +76,7 @@  subdir('proxy')
 subdir('sensor')
 subdir('software_isp')
 
-null_dep = dependency('', required : false)
-
-# TODO: Use dependency('dl') when updating to meson 0.62.0 or newer.
-libdl = null_dep
-if not cc.has_function('dlopen')
-    libdl = cc.find_library('dl')
-endif
+libdl = dependency('dl')
 libudev = dependency('libudev', required : get_option('udev'))
 libyaml = dependency('yaml-0.1', default_options : [
     'default_library=static',