From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 3/3] package/environment-setup: add cmake alias
Date: Mon, 27 Apr 2020 22:36:57 +0200 [thread overview]
Message-ID: <20200427203657.77392-3-angelo@amarulasolutions.com> (raw)
In-Reply-To: <20200427203657.77392-1-angelo@amarulasolutions.com>
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
In order to simplify the usage of a buildroot toolchain within
the buildroot shell, a "cmake" alias is provided to call cmake
with the correct toolchain file and options.
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
package/environment-setup/environment-setup | 1 +
package/environment-setup/environment-setup.mk | 3 +++
2 files changed, 4 insertions(+)
diff --git a/package/environment-setup/environment-setup b/package/environment-setup/environment-setup
index db652fe090..7c3ddda18b 100644
--- a/package/environment-setup/environment-setup
+++ b/package/environment-setup/environment-setup
@@ -12,6 +12,7 @@ Some tips:
* Target configure options are already exported
* To configure do "./configure $CONFIGURE_FLAGS"
* Alternatively use the alias "configure"
+* A "cmake" alias is available
EOF
SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk
index 3ffa8896cb..a02dcd9abb 100644
--- a/package/environment-setup/environment-setup.mk
+++ b/package/environment-setup/environment-setup.mk
@@ -25,6 +25,9 @@ define ENVIRONMENT_SETUP_INSTALL_TARGET_CMDS
--program-prefix=\"\n" >> $(ENVIRONMENT_SETUP_FILE)
printf "alias configure=\"./configure \$${CONFIGURE_FLAGS}\"\n" \
>> $(ENVIRONMENT_SETUP_FILE)
+ printf "alias cmake=\"cmake \
+ -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr\"\n" >> $(ENVIRONMENT_SETUP_FILE)
$(SED) $(ENVIRONMENT_SETUP_HOST_BIN_DIR_SED_EXP) \
-e $(ENVIRONMENT_SETUP_HOST_DIR_SED_EXP) \
-e $(ENVIRONMENT_SETUP_CROSS_COMPILE_SED_EXP) \
--
2.25.1
next prev parent reply other threads:[~2020-04-27 20:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 20:36 [Buildroot] [PATCH v5 1/3] package/environment-setup: new package Angelo Compagnucci
2020-04-27 20:36 ` [Buildroot] [PATCH v5 2/3] package/environment-setup: add configure alias Angelo Compagnucci
2020-04-27 20:36 ` Angelo Compagnucci [this message]
2020-04-28 7:42 ` [Buildroot] [PATCH v5 1/3] package/environment-setup: new package Mircea GLIGA
2020-04-28 8:42 ` Angelo Compagnucci
2020-04-28 11:04 ` Mircea GLIGA
2020-05-05 20:43 ` Angelo Compagnucci
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=20200427203657.77392-3-angelo@amarulasolutions.com \
--to=angelo.compagnucci@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox