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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* Standard autotools variables (CC, LD, CFLAGS) are exported
* To configure do "./configure $CONFIGURE_FLAGS" or use
the "configure" alias
+* To build CMake-based projects, use the "cmake" alias
EOF
SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
--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) 's%$(HOST_DIR)%\$$SDK_PATH%g' \
-e 's%$(HOST_DIR)/bin/%%g' \
-e '/^export "PATH=/c\' \