[Buildroot] [git commit] package/drogon: fix build with examples

Julien Olivain via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/4788039a894ed8a8041a5719c6acf1c2b3faa8d1
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master

Some examples embed CSP views, whose C++ sources are generated at build
time by drogon_ctl. When cross-compiling, CMake looks the tool up in
PATH, so the build fails with:

  [ 77%] Generating HelloView.h, HelloView.cc
  /bin/sh: 1: drogon_ctl: not found
  make[3]: *** [examples/CMakeFiles/helloworld.dir/build.make:74: examples/HelloView.h] Error 127

Add host-drogon to the dependencies, as it installs drogon_ctl in
$(HOST_DIR)/bin.

Fixes:
- https://autobuild.buildroot.org/results/b8f38b0645932cb5506515d6d313b64d824c8ce0

Signed-off-by: Dario Binacchi <[email protected]>
Signed-off-by: Julien Olivain <[email protected]>
---
 package/drogon/drogon.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/drogon/drogon.mk b/package/drogon/drogon.mk
index 89b1b2720c..73388ea92c 100644
--- a/package/drogon/drogon.mk
+++ b/package/drogon/drogon.mk
@@ -41,6 +41,11 @@ DROGON_CONF_OPTS += -DBUILD_CTL=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_DROGON_EXAMPLES),y)
+# Some examples embed CSP views, whose C++ sources are generated at
+# build time by drogon_ctl. When cross-compiling, CMake does not
+# substitute the drogon_ctl target executable in the custom command, so
+# the tool is looked up in PATH and must be provided by host-drogon.
+DROGON_DEPENDENCIES += host-drogon
 DROGON_CONF_OPTS += -DBUILD_EXAMPLES=ON
 else
 DROGON_CONF_OPTS += -DBUILD_EXAMPLES=OFF
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.