diff mbox series

[meta-oe,v1] glaze: use default install for cmake files

Message ID 20260204195202.1101258-3-frederikbraendstrup@gmail.com
State Under Review
Headers show
Series [meta-oe,v1] glaze: use default install for cmake files | expand

Commit Message

Frede Hoey Braendstrup Feb. 4, 2026, 7:52 p.m. UTC
CMake correctly installs glaze in a location that cmake can find via
find_package. Without this patch, an application using the following

    find_package(glaze)
    target_link_libraries(myprogram PUBLIC glaze::glaze)

Would fail with the following error (with tmpdir redacted)

    CMake Error in deps/vesl/src/Platform/CMakeLists.txt:
      Imported target "glaze::glaze" includes non-existent path

        "$TMPDIR/recipe-sysroot/usr/share/include"

      in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

      * The path was deleted, renamed, or moved to another location.

      * An install or uninstall procedure did not complete successfully.

      * The installation package was faulty and references files it does not
      provide.

Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com>
---
 meta-oe/recipes-support/glaze/glaze_7.0.1.bb | 7 -------
 1 file changed, 7 deletions(-)

--

Comments

Peter Kjellerstedt Feb. 5, 2026, 7:49 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Frederik Brændstrup via lists.openembedded.org
> Sent: den 4 februari 2026 20:52
> To: openembedded-devel@lists.openembedded.org
> Cc: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com>
> Subject: [oe] [meta-oe][PATCH v1] glaze: use default install for cmake files
> 
> CMake correctly installs glaze in a location that cmake can find via
> find_package. Without this patch, an application using the following
> 
>     find_package(glaze)
>     target_link_libraries(myprogram PUBLIC glaze::glaze)
> 
> Would fail with the following error (with tmpdir redacted)
> 
>     CMake Error in deps/vesl/src/Platform/CMakeLists.txt:
>       Imported target "glaze::glaze" includes non-existent path
> 
>         "$TMPDIR/recipe-sysroot/usr/share/include"
> 
>       in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
> 
>       * The path was deleted, renamed, or moved to another location.
> 
>       * An install or uninstall procedure did not complete successfully.
> 
>       * The installation package was faulty and references files it does not
>       provide.
> 
> Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com>
> ---
>  meta-oe/recipes-support/glaze/glaze_7.0.1.bb | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/glaze/glaze_7.0.1.bb b/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
> index e481290b9c..db87d636e6 100644
> --- a/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
> +++ b/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
> @@ -11,13 +11,6 @@ inherit cmake
> 
>  EXTRA_OECMAKE = "-Dglaze_BUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Dglaze_ENABLE_FUZZING=OFF -Dglaze_DEVELOPER_MODE=OFF"
> 
> -do_install:append() {
> -    install -d ${D}${datadir}/cmake/${BPN}
> -    mv -f ${D}${datadir}/${BPN}/*.cmake ${D}${datadir}/cmake/${BPN}
> -    rmdir -p --ignore-fail-on-non-empty ${D}${datadir}/${BPN}
> -}
> -

To make the cmake files continue to go in the ${PN}-dev package where 
they belong, you need to add:

FILES:${PN}-dev += "${datadir}/${BPN}/*.cmake"

> -# Glaze is a header-only C++ library, so the main package will be empty.

This comment is still valid (once FILES:${PN}-dev has been added above).

>  ALLOW_EMPTY:${PN} = "1"
> 
>  BBCLASSEXTEND = "native"
> --

//Peter
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/glaze/glaze_7.0.1.bb b/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
index e481290b9c..db87d636e6 100644
--- a/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
+++ b/meta-oe/recipes-support/glaze/glaze_7.0.1.bb
@@ -11,13 +11,6 @@  inherit cmake
 
 EXTRA_OECMAKE = "-Dglaze_BUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Dglaze_ENABLE_FUZZING=OFF -Dglaze_DEVELOPER_MODE=OFF"
 
-do_install:append() {
-    install -d ${D}${datadir}/cmake/${BPN}
-    mv -f ${D}${datadir}/${BPN}/*.cmake ${D}${datadir}/cmake/${BPN}
-    rmdir -p --ignore-fail-on-non-empty ${D}${datadir}/${BPN}
-}
-
-# Glaze is a header-only C++ library, so the main package will be empty.
 ALLOW_EMPTY:${PN} = "1"
 
 BBCLASSEXTEND = "native"