From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] pkg-cmake.mk: set pkg-config env. vars. in the host configure environment
Date: Sat, 5 Aug 2017 15:06:05 +0200 [thread overview]
Message-ID: <20170805130605.25877-1-s.martin49@gmail.com> (raw)
Cmake may run pkg-config to find the dependencies when configuring a
package. Because of the value of PATH, and it will use the Buildroot's
pkg-config wrapper, which, by default, is configured (via some
environment variables) to find the target dependencies.
So, this change makes sure the pkg-config environment variables are
properly set for finding host dependencies when configuring a
host-package.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/pkg-cmake.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 914bda7482..a91b0c2f57 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -109,6 +109,11 @@ define $(2)_CONFIGURE_CMDS
cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
PATH=$$(BR_PATH) \
+ PKG_CONFIG="$$(PKG_CONFIG_HOST_BINARY)" \
+ PKG_CONFIG_SYSROOT_DIR="/" \
+ PKG_CONFIG_LIBDIR="$$(HOST_DIR)/lib/pkgconfig:$$(HOST_DIR)/share/pkgconfig"
+ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
+ PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
--
2.13.4
next reply other threads:[~2017-08-05 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 13:06 Samuel Martin [this message]
2017-08-05 13:42 ` [Buildroot] [PATCH] pkg-cmake.mk: set pkg-config env. vars. in the host configure environment Thomas Petazzoni
2017-08-05 14:00 ` Samuel Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170805130605.25877-1-s.martin49@gmail.com \
--to=s.martin49@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.