diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-01-24 11:32:44 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-01-25 09:28:58 -0800 |
| commit | 924b1b1cb11300607067943b06f63679848500b9 (patch) | |
| tree | 93600cc4b2ea870c966235d3dc6e51e078aa1621 | |
| parent | 807c590498f205572242e4df81e4ab4f23378f03 (diff) | |
| download | meta-openembedded-924b1b1cb11300607067943b06f63679848500b9.tar.gz | |
civetweb: fix pathes in cmake file
1. The do_install:append() deleted the TMPDIR from the cmake file,
however that left two absolute pathes in the file: /usr/lib/libssl.so
and /usr/lib/libcrypto.so. In case another project is trying to link
to civetweb-server with cmake, it fails with the following error:
ninja: error: '/usr/lib/libssl.so', needed by 'examples/prometheus/prometheus_example', missing and no known rule to make it
Instead of only deleting the TMPDIR, change it to ${CMAKE_SYSROOT} -
a variable set by cmake.bbclass. This allows other projects to find
the required interfacing libraries successfully.
2. When linking to civetweb-server from another project using cmake,
the cmake file verifies if the /usr/bin/civetweb binary exists. When using
the class-target package, this file is not included in the sysroot during
build-time, so this check fails with the following error:
CMake Error at ${RECIPE_SYSROOT}/usr/lib/cmake/civetweb/civetweb-targets.cmake:97 (message):
The imported target "civetweb::server" references the file
"${RECIPE_SYSROOT}/usr/bin/civetweb"
but this file does not exist. Possible reasons include:
To avoid this error, this check is deleted for class-target.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb index f5a699d5be..d061e1a81d 100644 --- a/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb +++ b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb | |||
| @@ -41,8 +41,13 @@ PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OF | |||
| 41 | PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF," | 41 | PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF," |
| 42 | 42 | ||
| 43 | do_install:append() { | 43 | do_install:append() { |
| 44 | sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ | 44 | sed -i -e 's|${RECIPE_SYSROOT_NATIVE}|\$\{CMAKE_SYSROOT\}|g' \ |
| 45 | -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/civetweb/civetweb-targets.cmake | 45 | -e 's|${RECIPE_SYSROOT}|\$\{CMAKE_SYSROOT\}|g' ${D}${libdir}/cmake/civetweb/civetweb-targets.cmake |
| 46 | } | ||
| 47 | |||
| 48 | do_install:append:class-target() { | ||
| 49 | sed -i '/list(APPEND _cmake_import_check_files_for_civetweb::server "\${_IMPORT_PREFIX}\/bin\/civetweb" )/d' \ | ||
| 50 | ${D}${libdir}/cmake/civetweb/civetweb-targets-noconfig.cmake | ||
| 46 | } | 51 | } |
| 47 | 52 | ||
| 48 | BBCLASSEXTEND = "native" | 53 | BBCLASSEXTEND = "native" |
