[{"id":38027,"web_url":"https://patchwork.libcamera.org/comment/38027/","msgid":"<85ldhftd5n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-30T13:59:00","subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> Previously it was not possible to control these dependencies, they were\n> always used if found. Furthermore, libjpeg was unnecessarily added as a\n> dependency even if sdl2 was not found. Fix that by introducing three\n> options to control the dependencies.\n\nIf it is useful:\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  meson_options.txt        | 15 +++++++++++++++\n>  src/apps/cam/meson.build | 36 ++++++++++++++++++++++--------------\n>  2 files changed, 37 insertions(+), 14 deletions(-)\n>\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 8121cf5d2..58cf52ad1 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -16,6 +16,21 @@ option('cam',\n>          value : 'auto',\n>          description : 'Compile the cam test application')\n>  \n> +option('cam-output-kms',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable KMS output in the cam application')\n> +\n> +option('cam-output-sdl2',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable SDL2 output in the cam application')\n> +\n> +option('cam-output-sdl2-jpeg',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable JPEG support in the SDL2 output in the cam application')\n> +\n>  option('documentation',\n>          type : 'feature',\n>          value : 'auto',\n> diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build\n> index cd7f120f9..c73c0f5d9 100644\n> --- a/src/apps/cam/meson.build\n> +++ b/src/apps/cam/meson.build\n> @@ -17,9 +17,18 @@ cam_sources = files([\n>  \n>  cam_cpp_args = [apps_cpp_args]\n>  \n> -libdrm = dependency('libdrm', required : false)\n> -libjpeg = dependency('libjpeg', required : false)\n> -libsdl2 = dependency('SDL2', required : false)\n> +cam_deps = [\n> +    libatomic,\n> +    libcamera_public,\n> +    libevent,\n> +    libthreads,\n> +    libyaml,\n> +    libtiff,\n> +]\n> +\n> +libdrm = dependency('libdrm', required : get_option('cam-output-kms'))\n> +libsdl2 = dependency('SDL2', required : get_option('cam-output-sdl2'))\n> +libjpeg = dependency('libjpeg', required : get_option('cam-output-sdl2-jpeg'))\n>  \n>  if libdrm.found()\n>      cam_cpp_args += [ '-DHAVE_KMS' ]\n> @@ -27,6 +36,9 @@ if libdrm.found()\n>          'drm.cpp',\n>          'kms_sink.cpp'\n>      ])\n> +    cam_deps += [\n> +        libdrm,\n> +    ]\n>  endif\n>  \n>  if libsdl2.found()\n> @@ -37,28 +49,24 @@ if libsdl2.found()\n>          'sdl_texture_1plane.cpp',\n>          'sdl_texture_yuv.cpp',\n>      ])\n> +    cam_deps += [\n> +        libsdl2,\n> +    ]\n>  \n>      if libjpeg.found()\n>          cam_cpp_args += ['-DHAVE_LIBJPEG']\n>          cam_sources += files([\n>              'sdl_texture_mjpg.cpp'\n>          ])\n> +        cam_deps += [\n> +            libjpeg,\n> +        ]\n>      endif\n>  endif\n>  \n>  cam  = executable('cam', cam_sources,\n>                    link_with : apps_lib,\n> -                  dependencies : [\n> -                      libatomic,\n> -                      libcamera_public,\n> -                      libdrm,\n> -                      libevent,\n> -                      libjpeg,\n> -                      libsdl2,\n> -                      libtiff,\n> -                      libthreads,\n> -                      libyaml,\n> -                  ],\n> +                  dependencies : cam_deps,\n>                    cpp_args : cam_cpp_args,\n>                    install : true,\n>                    install_tag : 'bin')","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B1949C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Jan 2026 13:59:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12AEC61FD5;\n\tFri, 30 Jan 2026 14:59:10 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E87CA61FC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jan 2026 14:59:07 +0100 (CET)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-540-DHjrut5dMKmIKtlqO9ganQ-1; Fri, 30 Jan 2026 08:59:04 -0500","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-47ee3dd7fc8so23437915e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jan 2026 05:59:03 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-435e13235f5sm21893086f8f.29.2026.01.30.05.59.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 30 Jan 2026 05:59:01 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"hcdge/39\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769781545;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=BB3rT6QjuL6Tk1p7rfwX3K0Rlk4h0eCwAovrmRLYLbU=;\n\tb=hcdge/39vaCunx/IoFIpY/GDjHzbsI5BLRVv4YBid0OVeM3yQ48ndZx7YXjPcysvJCECHa\n\tIJHIO3rutuxR6r7zPSvf+xf+zcwzSWkfF9H8ov9cqxCZzYuiJFcARIbBpgzrXfUdiuNAvn\n\t7sLbmYiglpy3Tc/0jPZAUnHJumYkY1Q=","X-MC-Unique":"DHjrut5dMKmIKtlqO9ganQ-1","X-Mimecast-MFC-AGG-ID":"DHjrut5dMKmIKtlqO9ganQ_1769781543","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769781542; x=1770386342;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=F+doXJI1uGbyXPgd/etsyhcAeKZhfE+cdZxwQBoHewE=;\n\tb=bgClU7oMVVYcbpZ1usogkVa48DzPmZBXx0GOFsC3WPdQP+7x2Jj5V5sq9xcXw4E/Ye\n\tA9LWMtpCvXceHA21XrumvjL8D5t/66g2IVIlLWeDS4MpHllBW5yayLEBJIZUM2HjfKb6\n\tT7IPlZgIbMikhGcoKoHkLGbRHuuZB3/v7U8hnd1vS1KyuI1pwxVgi1dZaaLha7waT5Lb\n\ttJTeAvm/8v6Mnx83DzD0G6Ozgvdxq8zfv/pEhqeFwEFovgZccSMP6K4vAVFVMeiF4+ra\n\tBYEzUsWnBld+FTn9wvSFmZllR6B215teSWbES1Af9e5s0VpDlxGAbCqxqp4G2XNt8pia\n\tbymQ==","X-Gm-Message-State":"AOJu0YxbdEDwm6qLYSm0pl2KFnFZJwTZv7V7GYqbhBMO7+qt6HOhQVDZ\n\t419yiy0whz7jwRfZQ7L7UG1ty83iYGYlP8AEApqZMEQdSn3QGLlLWA0qdTRRdnRXgd0WHimrNpk\n\tmG3csfNObsDMyLsrwvc1w8sEybH1nqegb9lf4Kb8M80b/iZuhPSuhVayJgbO7eMbEePYoLZ14AW\n\trEBhLx784uGMZTkE+ns3hKZOZLshxCpIi8BlPlKR0Qwv7vt11HLK8AuC8xzlY=","X-Gm-Gg":"AZuq6aLENXyuxemxljoMk2ih0IF6+uPnbe4rZe9ZtMdfJ1jJRt1fuETYTLCuywPTE3+\n\tM+FSWNE7AKzG3E/Bs0/szLIlrnimqO1PMI90UBhMae1PnGRrVBLpfouru7beETriSCEeixBMGfU\n\t+uU+A3Gwbmkc/AGJuFMWkgyInhcWr+WS810DOYdckGxlxT6pDTJJHN7yEROdFUp8fn4gv60EsRb\n\tRxt8vpGlqrpTJ6LoW460aokP2RjZj5EGfUBReOdnLYtM5skCaTUM5vuyGPRWIDYyGdxRGgBkn3S\n\trb+Td5NOlPFpttiAnqn9pIhH9ZU7kR7MYEksWnxFuaVxyBu5offEFWhZ8mj8qMMmzEsVgMAMSac\n\tYWBIFtdBRlC0KCFEHON7j8s44ZWJP2VdRWeVRqD46Yle9AI6GNjajY94qhXuRIVw=","X-Received":["by 2002:a05:600c:470c:b0:47e:e952:86c9 with SMTP id\n\t5b1f17b1804b1-482db1ffb81mr41412835e9.0.1769781542375; \n\tFri, 30 Jan 2026 05:59:02 -0800 (PST)","by 2002:a05:600c:470c:b0:47e:e952:86c9 with SMTP id\n\t5b1f17b1804b1-482db1ffb81mr41412545e9.0.1769781541991; \n\tFri, 30 Jan 2026 05:59:01 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","In-Reply-To":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Fri,\n\t30 Jan 2026  12:11:33 +0100\")","References":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>","Date":"Fri, 30 Jan 2026 14:59:00 +0100","Message-ID":"<85ldhftd5n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"g4QTJuJwDjzQa-9FbjdcbIE_dF7u62Z4CX4aN2weKJI_1769781543","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38109,"web_url":"https://patchwork.libcamera.org/comment/38109/","msgid":"<20260206005502.GH1376807@killaraus.ideasonboard.com>","date":"2026-02-06T00:55:02","subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jan 30, 2026 at 12:11:33PM +0100, Barnabás Pőcze wrote:\n> Previously it was not possible to control these dependencies, they were\n> always used if found. Furthermore, libjpeg was unnecessarily added as a\n> dependency even if sdl2 was not found. Fix that by introducing three\n> options to control the dependencies.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  meson_options.txt        | 15 +++++++++++++++\n>  src/apps/cam/meson.build | 36 ++++++++++++++++++++++--------------\n>  2 files changed, 37 insertions(+), 14 deletions(-)\n> \n> diff --git a/meson_options.txt b/meson_options.txt\n> index 8121cf5d2..58cf52ad1 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -16,6 +16,21 @@ option('cam',\n>          value : 'auto',\n>          description : 'Compile the cam test application')\n>  \n> +option('cam-output-kms',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable KMS output in the cam application')\n> +\n> +option('cam-output-sdl2',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable SDL2 output in the cam application')\n> +\n> +option('cam-output-sdl2-jpeg',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable JPEG support in the SDL2 output in the cam application')\n> +\n>  option('documentation',\n>          type : 'feature',\n>          value : 'auto',\n> diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build\n> index cd7f120f9..c73c0f5d9 100644\n> --- a/src/apps/cam/meson.build\n> +++ b/src/apps/cam/meson.build\n> @@ -17,9 +17,18 @@ cam_sources = files([\n>  \n>  cam_cpp_args = [apps_cpp_args]\n>  \n> -libdrm = dependency('libdrm', required : false)\n> -libjpeg = dependency('libjpeg', required : false)\n> -libsdl2 = dependency('SDL2', required : false)\n> +cam_deps = [\n> +    libatomic,\n> +    libcamera_public,\n> +    libevent,\n> +    libthreads,\n> +    libyaml,\n> +    libtiff,\n> +]\n> +\n> +libdrm = dependency('libdrm', required : get_option('cam-output-kms'))\n> +libsdl2 = dependency('SDL2', required : get_option('cam-output-sdl2'))\n> +libjpeg = dependency('libjpeg', required : get_option('cam-output-sdl2-jpeg'))\n\nI wonder if we could combine the cam-output-sdl2 and\ncam-output-sdl2-jpeg options here to avoid looking up libjpeg if SDL2 is\ndisabled, but it's probably not worth it.\n\nActually, I think we should support JPEG decompression with the KMS\noutput as well, in which case the option would become cam-jpeg (or\nsomething similar). We could already name it like that, to avoid\nrenaming it later.\n\nWith that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>  if libdrm.found()\n>      cam_cpp_args += [ '-DHAVE_KMS' ]\n> @@ -27,6 +36,9 @@ if libdrm.found()\n>          'drm.cpp',\n>          'kms_sink.cpp'\n>      ])\n> +    cam_deps += [\n> +        libdrm,\n> +    ]\n>  endif\n>  \n>  if libsdl2.found()\n> @@ -37,28 +49,24 @@ if libsdl2.found()\n>          'sdl_texture_1plane.cpp',\n>          'sdl_texture_yuv.cpp',\n>      ])\n> +    cam_deps += [\n> +        libsdl2,\n> +    ]\n>  \n>      if libjpeg.found()\n>          cam_cpp_args += ['-DHAVE_LIBJPEG']\n>          cam_sources += files([\n>              'sdl_texture_mjpg.cpp'\n>          ])\n> +        cam_deps += [\n> +            libjpeg,\n> +        ]\n>      endif\n>  endif\n>  \n>  cam  = executable('cam', cam_sources,\n>                    link_with : apps_lib,\n> -                  dependencies : [\n> -                      libatomic,\n> -                      libcamera_public,\n> -                      libdrm,\n> -                      libevent,\n> -                      libjpeg,\n> -                      libsdl2,\n> -                      libtiff,\n> -                      libthreads,\n> -                      libyaml,\n> -                  ],\n> +                  dependencies : cam_deps,\n>                    cpp_args : cam_cpp_args,\n>                    install : true,\n>                    install_tag : 'bin')","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7B0F6C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Feb 2026 00:55:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 791FC62074;\n\tFri,  6 Feb 2026 01:55:06 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 216C061FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Feb 2026 01:55:04 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id A2F882E0;\n\tFri,  6 Feb 2026 01:54:20 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"W20aELv7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770339260;\n\tbh=jj2vVgu6CG6Q/B+tOg0HmxG/dfTrUsIjpX34DDXYGbQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W20aELv7zZxD2VcpLzhpOdRsyBAI4VukCZbCS+MuJ/szDbBydXyH97fjXxxTKQrs0\n\tEizAsx6NDrhDG+WoQTW9loeu9BOqI7aAVaNGudGOD/ML5dV0ykdvpYWzPYPKwStueG\n\t4Rt0+xSamfCNkEIasx/k1ZkMAoRp5f/KodpdyyFc=","Date":"Fri, 6 Feb 2026 02:55:02 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","Message-ID":"<20260206005502.GH1376807@killaraus.ideasonboard.com>","References":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38110,"web_url":"https://patchwork.libcamera.org/comment/38110/","msgid":"<177033986958.1808100.10547193088372648212@ping.linuxembedded.co.uk>","date":"2026-02-06T01:04:29","subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2,\n\tjpeg dependencies of `cam`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-02-06 00:55:02)\n> On Fri, Jan 30, 2026 at 12:11:33PM +0100, Barnabás Pőcze wrote:\n> > Previously it was not possible to control these dependencies, they were\n> > always used if found. Furthermore, libjpeg was unnecessarily added as a\n> > dependency even if sdl2 was not found. Fix that by introducing three\n> > options to control the dependencies.\n> > \n> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > ---\n> >  meson_options.txt        | 15 +++++++++++++++\n> >  src/apps/cam/meson.build | 36 ++++++++++++++++++++++--------------\n> >  2 files changed, 37 insertions(+), 14 deletions(-)\n> > \n> > diff --git a/meson_options.txt b/meson_options.txt\n> > index 8121cf5d2..58cf52ad1 100644\n> > --- a/meson_options.txt\n> > +++ b/meson_options.txt\n> > @@ -16,6 +16,21 @@ option('cam',\n> >          value : 'auto',\n> >          description : 'Compile the cam test application')\n> >  \n> > +option('cam-output-kms',\n> > +        type : 'feature',\n> > +        value : 'auto',\n> > +        description : 'Enable KMS output in the cam application')\n> > +\n> > +option('cam-output-sdl2',\n> > +        type : 'feature',\n> > +        value : 'auto',\n> > +        description : 'Enable SDL2 output in the cam application')\n> > +\n> > +option('cam-output-sdl2-jpeg',\n> > +        type : 'feature',\n> > +        value : 'auto',\n> > +        description : 'Enable JPEG support in the SDL2 output in the cam application')\n> > +\n> >  option('documentation',\n> >          type : 'feature',\n> >          value : 'auto',\n> > diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build\n> > index cd7f120f9..c73c0f5d9 100644\n> > --- a/src/apps/cam/meson.build\n> > +++ b/src/apps/cam/meson.build\n> > @@ -17,9 +17,18 @@ cam_sources = files([\n> >  \n> >  cam_cpp_args = [apps_cpp_args]\n> >  \n> > -libdrm = dependency('libdrm', required : false)\n> > -libjpeg = dependency('libjpeg', required : false)\n> > -libsdl2 = dependency('SDL2', required : false)\n> > +cam_deps = [\n> > +    libatomic,\n> > +    libcamera_public,\n> > +    libevent,\n> > +    libthreads,\n> > +    libyaml,\n> > +    libtiff,\n> > +]\n> > +\n> > +libdrm = dependency('libdrm', required : get_option('cam-output-kms'))\n> > +libsdl2 = dependency('SDL2', required : get_option('cam-output-sdl2'))\n> > +libjpeg = dependency('libjpeg', required : get_option('cam-output-sdl2-jpeg'))\n> \n> I wonder if we could combine the cam-output-sdl2 and\n> cam-output-sdl2-jpeg options here to avoid looking up libjpeg if SDL2 is\n> disabled, but it's probably not worth it.\n> \n> Actually, I think we should support JPEG decompression with the KMS\n> output as well, in which case the option would become cam-jpeg (or\n> something similar). We could already name it like that, to avoid\n> renaming it later.\n\nWhy not call these options more direct matches? We also have libjpeg\nusage in the virtual pipeline handler:\n\n  -Dlibjpeg=enabled -DSDL2=enabled -Dlibdrm=disabled\n\nand EGL might have a hidden dependency on libdrm:\n\nsrc/libcamera/egl.cpp:#include <libdrm/drm_fourcc.h>\n\n\n> \n> With that,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI won't object to these though! Above is only a thought/comment.\n\n> \n> >  \n> >  if libdrm.found()\n> >      cam_cpp_args += [ '-DHAVE_KMS' ]\n> > @@ -27,6 +36,9 @@ if libdrm.found()\n> >          'drm.cpp',\n> >          'kms_sink.cpp'\n> >      ])\n> > +    cam_deps += [\n> > +        libdrm,\n> > +    ]\n> >  endif\n> >  \n> >  if libsdl2.found()\n> > @@ -37,28 +49,24 @@ if libsdl2.found()\n> >          'sdl_texture_1plane.cpp',\n> >          'sdl_texture_yuv.cpp',\n> >      ])\n> > +    cam_deps += [\n> > +        libsdl2,\n> > +    ]\n> >  \n> >      if libjpeg.found()\n> >          cam_cpp_args += ['-DHAVE_LIBJPEG']\n> >          cam_sources += files([\n> >              'sdl_texture_mjpg.cpp'\n> >          ])\n> > +        cam_deps += [\n> > +            libjpeg,\n> > +        ]\n> >      endif\n> >  endif\n> >  \n> >  cam  = executable('cam', cam_sources,\n> >                    link_with : apps_lib,\n> > -                  dependencies : [\n> > -                      libatomic,\n> > -                      libcamera_public,\n> > -                      libdrm,\n> > -                      libevent,\n> > -                      libjpeg,\n> > -                      libsdl2,\n> > -                      libtiff,\n> > -                      libthreads,\n> > -                      libyaml,\n> > -                  ],\n> > +                  dependencies : cam_deps,\n> >                    cpp_args : cam_cpp_args,\n> >                    install : true,\n> >                    install_tag : 'bin')\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EFAFBBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Feb 2026 01:04:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E070F62078;\n\tFri,  6 Feb 2026 02:04:33 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9BCF361FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Feb 2026 02:04:32 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2D7BC460;\n\tFri,  6 Feb 2026 02:03:49 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"j4PRSegU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770339829;\n\tbh=9j9p1O6NaiqLj36qcYN9J8LVW0vAxSYVSo8fkiPhr/U=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=j4PRSegUlZtRytRTR5gP722A5tRwJhGX+f7nKmH8wivc9qO1VgljVdyT2aMRF0nBM\n\tEq/evthLwsrSrhAKA0cLWI5czcWAwjhxlTeL9uhwD0lldJb/+A7mwTtWxc3LOTaP++\n\tViIDaSU3IiQ8tEc8yuXPptslr3qdSZ8tic6QVGHo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260206005502.GH1376807@killaraus.ideasonboard.com>","References":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>\n\t<20260206005502.GH1376807@killaraus.ideasonboard.com>","Subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2,\n\tjpeg dependencies of `cam`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Fri, 06 Feb 2026 01:04:29 +0000","Message-ID":"<177033986958.1808100.10547193088372648212@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38112,"web_url":"https://patchwork.libcamera.org/comment/38112/","msgid":"<20260206011443.GI1376807@killaraus.ideasonboard.com>","date":"2026-02-06T01:14:43","subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Feb 06, 2026 at 01:04:29AM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2026-02-06 00:55:02)\n> > On Fri, Jan 30, 2026 at 12:11:33PM +0100, Barnabás Pőcze wrote:\n> > > Previously it was not possible to control these dependencies, they were\n> > > always used if found. Furthermore, libjpeg was unnecessarily added as a\n> > > dependency even if sdl2 was not found. Fix that by introducing three\n> > > options to control the dependencies.\n> > > \n> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > ---\n> > >  meson_options.txt        | 15 +++++++++++++++\n> > >  src/apps/cam/meson.build | 36 ++++++++++++++++++++++--------------\n> > >  2 files changed, 37 insertions(+), 14 deletions(-)\n> > > \n> > > diff --git a/meson_options.txt b/meson_options.txt\n> > > index 8121cf5d2..58cf52ad1 100644\n> > > --- a/meson_options.txt\n> > > +++ b/meson_options.txt\n> > > @@ -16,6 +16,21 @@ option('cam',\n> > >          value : 'auto',\n> > >          description : 'Compile the cam test application')\n> > >  \n> > > +option('cam-output-kms',\n> > > +        type : 'feature',\n> > > +        value : 'auto',\n> > > +        description : 'Enable KMS output in the cam application')\n> > > +\n> > > +option('cam-output-sdl2',\n> > > +        type : 'feature',\n> > > +        value : 'auto',\n> > > +        description : 'Enable SDL2 output in the cam application')\n> > > +\n> > > +option('cam-output-sdl2-jpeg',\n> > > +        type : 'feature',\n> > > +        value : 'auto',\n> > > +        description : 'Enable JPEG support in the SDL2 output in the cam application')\n> > > +\n> > >  option('documentation',\n> > >          type : 'feature',\n> > >          value : 'auto',\n> > > diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build\n> > > index cd7f120f9..c73c0f5d9 100644\n> > > --- a/src/apps/cam/meson.build\n> > > +++ b/src/apps/cam/meson.build\n> > > @@ -17,9 +17,18 @@ cam_sources = files([\n> > >  \n> > >  cam_cpp_args = [apps_cpp_args]\n> > >  \n> > > -libdrm = dependency('libdrm', required : false)\n> > > -libjpeg = dependency('libjpeg', required : false)\n> > > -libsdl2 = dependency('SDL2', required : false)\n> > > +cam_deps = [\n> > > +    libatomic,\n> > > +    libcamera_public,\n> > > +    libevent,\n> > > +    libthreads,\n> > > +    libyaml,\n> > > +    libtiff,\n> > > +]\n> > > +\n> > > +libdrm = dependency('libdrm', required : get_option('cam-output-kms'))\n> > > +libsdl2 = dependency('SDL2', required : get_option('cam-output-sdl2'))\n> > > +libjpeg = dependency('libjpeg', required : get_option('cam-output-sdl2-jpeg'))\n> > \n> > I wonder if we could combine the cam-output-sdl2 and\n> > cam-output-sdl2-jpeg options here to avoid looking up libjpeg if SDL2 is\n> > disabled, but it's probably not worth it.\n> > \n> > Actually, I think we should support JPEG decompression with the KMS\n> > output as well, in which case the option would become cam-jpeg (or\n> > something similar). We could already name it like that, to avoid\n> > renaming it later.\n> \n> Why not call these options more direct matches? We also have libjpeg\n> usage in the virtual pipeline handler:\n> \n>   -Dlibjpeg=enabled -DSDL2=enabled -Dlibdrm=disabled\n\nWe may want to for instance enable JPEG support in cam but not in the\nvirtual pipeline handler. I think focussing on the features we enable\ninstead of the dependency is clearer for the user (but I could be\nwrong).\n\n> and EGL might have a hidden dependency on libdrm:\n> \n> src/libcamera/egl.cpp:#include <libdrm/drm_fourcc.h>\n\nThe main problem with hidden dependencies is linking to shared library,\nso this one is likely not an issue in practice. This being said, we\ncould use our own copy of drm_fourcc.h.\n\n> > With that,\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> I won't object to these though! Above is only a thought/comment.\n> \n> > >  \n> > >  if libdrm.found()\n> > >      cam_cpp_args += [ '-DHAVE_KMS' ]\n> > > @@ -27,6 +36,9 @@ if libdrm.found()\n> > >          'drm.cpp',\n> > >          'kms_sink.cpp'\n> > >      ])\n> > > +    cam_deps += [\n> > > +        libdrm,\n> > > +    ]\n> > >  endif\n> > >  \n> > >  if libsdl2.found()\n> > > @@ -37,28 +49,24 @@ if libsdl2.found()\n> > >          'sdl_texture_1plane.cpp',\n> > >          'sdl_texture_yuv.cpp',\n> > >      ])\n> > > +    cam_deps += [\n> > > +        libsdl2,\n> > > +    ]\n> > >  \n> > >      if libjpeg.found()\n> > >          cam_cpp_args += ['-DHAVE_LIBJPEG']\n> > >          cam_sources += files([\n> > >              'sdl_texture_mjpg.cpp'\n> > >          ])\n> > > +        cam_deps += [\n> > > +            libjpeg,\n> > > +        ]\n> > >      endif\n> > >  endif\n> > >  \n> > >  cam  = executable('cam', cam_sources,\n> > >                    link_with : apps_lib,\n> > > -                  dependencies : [\n> > > -                      libatomic,\n> > > -                      libcamera_public,\n> > > -                      libdrm,\n> > > -                      libevent,\n> > > -                      libjpeg,\n> > > -                      libsdl2,\n> > > -                      libtiff,\n> > > -                      libthreads,\n> > > -                      libyaml,\n> > > -                  ],\n> > > +                  dependencies : cam_deps,\n> > >                    cpp_args : cam_cpp_args,\n> > >                    install : true,\n> > >                    install_tag : 'bin')","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 229A0BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Feb 2026 01:14:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 345FE6207C;\n\tFri,  6 Feb 2026 02:14:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 735FE61FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Feb 2026 02:14:45 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D61FCA06;\n\tFri,  6 Feb 2026 02:14:01 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MMat/5DI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770340442;\n\tbh=KOCCfhicK/pR7m7ZDFsz7NNDb9Ja70uWglpi1YUwDUE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MMat/5DIhU2DwWPjh1X2UKGPyPoreZcp3pCcwr4rwrQ9g9ytwmdlInPjInZb/C8jW\n\tPihu6FPGEGmLGryCYwih6U04WrG2cXO1o7QWpEZx/Bzvozya5XkHWixB+L53nyfoxU\n\trlPcQgT+9hfwghBMJMOI/2mpXztk7MSr3IsSopy0=","Date":"Fri, 6 Feb 2026 03:14:43 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","Message-ID":"<20260206011443.GI1376807@killaraus.ideasonboard.com>","References":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>\n\t<20260206005502.GH1376807@killaraus.ideasonboard.com>\n\t<177033986958.1808100.10547193088372648212@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<177033986958.1808100.10547193088372648212@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38114,"web_url":"https://patchwork.libcamera.org/comment/38114/","msgid":"<cb189b5e-b633-481b-b772-17a0cca3f1e2@ideasonboard.com>","date":"2026-02-06T08:06:31","subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 02. 06. 2:14 keltezéssel, Laurent Pinchart írta:\n> On Fri, Feb 06, 2026 at 01:04:29AM +0000, Kieran Bingham wrote:\n>> Quoting Laurent Pinchart (2026-02-06 00:55:02)\n>>> On Fri, Jan 30, 2026 at 12:11:33PM +0100, Barnabás Pőcze wrote:\n>>>> Previously it was not possible to control these dependencies, they were\n>>>> always used if found. Furthermore, libjpeg was unnecessarily added as a\n>>>> dependency even if sdl2 was not found. Fix that by introducing three\n>>>> options to control the dependencies.\n>>>>\n>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>>> ---\n>>>>   meson_options.txt        | 15 +++++++++++++++\n>>>>   src/apps/cam/meson.build | 36 ++++++++++++++++++++++--------------\n>>>>   2 files changed, 37 insertions(+), 14 deletions(-)\n>>>>\n>>>> diff --git a/meson_options.txt b/meson_options.txt\n>>>> index 8121cf5d2..58cf52ad1 100644\n>>>> --- a/meson_options.txt\n>>>> +++ b/meson_options.txt\n>>>> @@ -16,6 +16,21 @@ option('cam',\n>>>>           value : 'auto',\n>>>>           description : 'Compile the cam test application')\n>>>>   \n>>>> +option('cam-output-kms',\n>>>> +        type : 'feature',\n>>>> +        value : 'auto',\n>>>> +        description : 'Enable KMS output in the cam application')\n>>>> +\n>>>> +option('cam-output-sdl2',\n>>>> +        type : 'feature',\n>>>> +        value : 'auto',\n>>>> +        description : 'Enable SDL2 output in the cam application')\n>>>> +\n>>>> +option('cam-output-sdl2-jpeg',\n>>>> +        type : 'feature',\n>>>> +        value : 'auto',\n>>>> +        description : 'Enable JPEG support in the SDL2 output in the cam application')\n>>>> +\n>>>>   option('documentation',\n>>>>           type : 'feature',\n>>>>           value : 'auto',\n>>>> diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build\n>>>> index cd7f120f9..c73c0f5d9 100644\n>>>> --- a/src/apps/cam/meson.build\n>>>> +++ b/src/apps/cam/meson.build\n>>>> @@ -17,9 +17,18 @@ cam_sources = files([\n>>>>   \n>>>>   cam_cpp_args = [apps_cpp_args]\n>>>>   \n>>>> -libdrm = dependency('libdrm', required : false)\n>>>> -libjpeg = dependency('libjpeg', required : false)\n>>>> -libsdl2 = dependency('SDL2', required : false)\n>>>> +cam_deps = [\n>>>> +    libatomic,\n>>>> +    libcamera_public,\n>>>> +    libevent,\n>>>> +    libthreads,\n>>>> +    libyaml,\n>>>> +    libtiff,\n>>>> +]\n>>>> +\n>>>> +libdrm = dependency('libdrm', required : get_option('cam-output-kms'))\n>>>> +libsdl2 = dependency('SDL2', required : get_option('cam-output-sdl2'))\n>>>> +libjpeg = dependency('libjpeg', required : get_option('cam-output-sdl2-jpeg'))\n>>>\n>>> I wonder if we could combine the cam-output-sdl2 and\n>>> cam-output-sdl2-jpeg options here to avoid looking up libjpeg if SDL2 is\n>>> disabled, but it's probably not worth it.\n>>>\n>>> Actually, I think we should support JPEG decompression with the KMS\n>>> output as well, in which case the option would become cam-jpeg (or\n>>> something similar). We could already name it like that, to avoid\n>>> renaming it later.\n>>\n>> Why not call these options more direct matches? We also have libjpeg\n>> usage in the virtual pipeline handler:\n>>\n>>    -Dlibjpeg=enabled -DSDL2=enabled -Dlibdrm=disabled\n> \n> We may want to for instance enable JPEG support in cam but not in the\n> virtual pipeline handler. I think focussing on the features we enable\n> instead of the dependency is clearer for the user (but I could be\n> wrong).\n\nThis is indeed the motivation. I also think it is more useful to be\nable to say \"I want this feature of this component\" instead of having\nto list a (potentially changing) list of dependency names (that might\nalso enable some other unwanted things).\n\nAlthough admittedly it results in a somewhat more complicated dependency\nmanagement than having a single global switch for each.\n\nThoughts? Should we go with \"feature options control features components\"\nor \"feature options control specific dependencies\"?\n\n\n> \n>> and EGL might have a hidden dependency on libdrm:\n>>\n>> src/libcamera/egl.cpp:#include <libdrm/drm_fourcc.h>\n> \n> The main problem with hidden dependencies is linking to shared library,\n> so this one is likely not an issue in practice. This being said, we\n> could use our own copy of drm_fourcc.h.\n> \n>>> With that,\n>>>\n>>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>\n>> I won't object to these though! Above is only a thought/comment.\n>>\n>>>>   \n>>>>   if libdrm.found()\n>>>>       cam_cpp_args += [ '-DHAVE_KMS' ]\n>>>> @@ -27,6 +36,9 @@ if libdrm.found()\n>>>>           'drm.cpp',\n>>>>           'kms_sink.cpp'\n>>>>       ])\n>>>> +    cam_deps += [\n>>>> +        libdrm,\n>>>> +    ]\n>>>>   endif\n>>>>   \n>>>>   if libsdl2.found()\n>>>> @@ -37,28 +49,24 @@ if libsdl2.found()\n>>>>           'sdl_texture_1plane.cpp',\n>>>>           'sdl_texture_yuv.cpp',\n>>>>       ])\n>>>> +    cam_deps += [\n>>>> +        libsdl2,\n>>>> +    ]\n>>>>   \n>>>>       if libjpeg.found()\n>>>>           cam_cpp_args += ['-DHAVE_LIBJPEG']\n>>>>           cam_sources += files([\n>>>>               'sdl_texture_mjpg.cpp'\n>>>>           ])\n>>>> +        cam_deps += [\n>>>> +            libjpeg,\n>>>> +        ]\n>>>>       endif\n>>>>   endif\n>>>>   \n>>>>   cam  = executable('cam', cam_sources,\n>>>>                     link_with : apps_lib,\n>>>> -                  dependencies : [\n>>>> -                      libatomic,\n>>>> -                      libcamera_public,\n>>>> -                      libdrm,\n>>>> -                      libevent,\n>>>> -                      libjpeg,\n>>>> -                      libsdl2,\n>>>> -                      libtiff,\n>>>> -                      libthreads,\n>>>> -                      libyaml,\n>>>> -                  ],\n>>>> +                  dependencies : cam_deps,\n>>>>                     cpp_args : cam_cpp_args,\n>>>>                     install : true,\n>>>>                     install_tag : 'bin')\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BA66CBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Feb 2026 08:06:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0C8F6207D;\n\tFri,  6 Feb 2026 09:06:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D23F61FC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Feb 2026 09:06:36 +0100 (CET)","from [192.168.33.58] (185.221.141.206.nat.pool.zt.hu\n\t[185.221.141.206])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C1EF63B;\n\tFri,  6 Feb 2026 09:05:52 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nEGbwmQE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770365153;\n\tbh=M2slGmXLzGd8SsXWp9Bhdj9nFpcpjFyB8LIMhRhi6LM=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=nEGbwmQE828ew38Cjy0EuJgbsl90ruzA4eM9gHJomrqW+CV2P68YJzUQdu1yjZ44R\n\tIAUQSTOtwjhiOGEYXpExrTx0v+7gx+SSbHaDVZ2DB3Gv2wQPmEzgEUmGUkjhdiFsih\n\t5Hyncp+9v609pLf/mtgdlt4L8W8FmNDJEtqaCuFU=","Message-ID":"<cb189b5e-b633-481b-b772-17a0cca3f1e2@ideasonboard.com>","Date":"Fri, 6 Feb 2026 09:06:31 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] meson: Add options to control drm, sdl2, jpeg\n\tdependencies of `cam`","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260130111133.1576210-1-barnabas.pocze@ideasonboard.com>\n\t<20260206005502.GH1376807@killaraus.ideasonboard.com>\n\t<177033986958.1808100.10547193088372648212@ping.linuxembedded.co.uk>\n\t<20260206011443.GI1376807@killaraus.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260206011443.GI1376807@killaraus.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]