diff --git a/package/environment-setup/environment-setup b/package/environment-setup/environment-setup index 58701e4c71..813aa01c7a 100644 --- a/package/environment-setup/environment-setup +++ b/package/environment-setup/environment-setup @@ -12,6 +12,7 @@ Some tips: * 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]}")) diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk index be36cd452b..fb87c6f0b7 100644 --- a/package/environment-setup/environment-setup.mk +++ b/package/environment-setup/environment-setup.mk @@ -22,6 +22,9 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_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) 's%$(HOST_DIR)%\$$SDK_PATH%g' \ -e 's%$(HOST_DIR)/bin/%%g' \ -e '/^export "PATH=/c\' \