Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56CF4CDB465 for ; Thu, 19 Oct 2023 15:21:21 +0000 (UTC) Subject: Run generated executable in cmake recipe #cmake #kirkstone #make #native #yocto To: yocto@lists.yoctoproject.org From: "Darek Konopka" X-Originating-Location: US (12.74.55.100) X-Originating-Platform: iPhone Safari 17 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 19 Oct 2023 08:21:16 -0700 Message-ID: Content-Type: multipart/alternative; boundary="nUMtTjqnuuIJIIj5RnGx" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 19 Oct 2023 15:21:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61419 --nUMtTjqnuuIJIIj5RnGx Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello all, So I have a cmake project that uses an executable generated from a cmake su= bproject. My architecture is as such =E2=94=9C=E2=94=80=E2=94=80 ProjectA =E2=94=9C=E2=94=80=E2=94=80 projecta_1.0.bb ( http://projecta_1.0.bb/ ) =E2=94=9C=E2=94=80=E2=94=80 files =E2=94=9C=E2=94=80=E2=94=80 ProjectA =E2=94=9C=E2=94=80=E2=94=80 CMakeLists.txt =E2=94=9C=E2=94=80=E2=94=80=C2=A0 ProjectB =E2=94=9C=E2=94=80=E2=94=80 CMakeLists.txt My recipe is a standard recipe that inherits pkgconfig cmake The issue that occurs is that when manually building ProjectA natively it b= uilds as expected, but when building it with yocto, during the do_compile f= or ProjectA, it says it is missing=C2=A0the executable generated by Project= B located=C2=A0in /usr/bin/ProjBEXE (this executable is needed in order to = compile ProjectA). What did work is creating a projectb-native recipe that runs cmake-native, = and then have projecta depend on it, but I was wondering, is there a way to= have projecta_1.0.bb ( http://projecta_1.0.bb/ ) build the executable and = use it within its own cmake? Perhaps making projectB a package to have proj= ectA use it? NOTE: I am using yocto kirkstone --nUMtTjqnuuIJIIj5RnGx Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hell= o all,

So I have a cmake project that uses an executable genera= ted from a cmake subproject. 
M= y architecture is as such 
&= nbsp;   =E2=94=9C=E2=94=80=E2=94=80 ProjectA
&= nbsp;         =E2=94=9C=E2=94=80=E2=94=80 projecta_1.0.bb
          =E2=94=9C=E2= =94=80=E2=94=80 files
&= nbsp;              =E2=94=9C=E2=94=80=E2= =94=80 ProjectA
&= nbsp;                    = =E2=94=9C=E2=94=80=E2=94=80 CMakeLists.txt
&= nbsp;                    = =E2=94=9C=E2=94=80=E2=94=80  ProjectB
&= nbsp;                    =    =E2=94=9C=E2=94=80=E2=94=80 CMakeLists.txt
My recipe is a= standard recipe that inherits pkgconfig cmake
The issue that= occurs is that when manually building ProjectA natively it builds as expec= ted, but when building it with yocto, during the do_compile for ProjectA, i= t says it is missing the executable generated by ProjectB located = ;in /usr/bin/ProjBEXE (this executable is needed in order to compile Projec= tA). 
 
What did work = is creating a projectb-native recipe that runs cmake-native, and then have = projecta depend on it, but I was wondering, is there a way to have projecta_1.0.bb build the executable and use it within its own cmake? Perhaps making pr= ojectB a package to have projectA use it? 
NOTE: I am usi= ng yocto kirkstone
--nUMtTjqnuuIJIIj5RnGx--