Index: tools/cmake/Makefile
===================================================================
--- tools/cmake/Makefile	(revision 0)
+++ tools/cmake/Makefile	(revision 0)
@@ -0,0 +1,34 @@
+# 
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cmake
+PKG_VERSION_MAJOR=2.8
+PKG_VERSION_MINOR=3
+PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_MINOR)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cmake.org/files/v$(PKG_VERSION_MAJOR)
+PKG_MD5SUM:=a76a44b93acf5e3badda9de111385921
+PKG_CAT:=zcat
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Compile
+	$(MAKE) CC="$(HOSTCC)" -C $(HOST_BUILD_DIR)
+endef
+
+define Host/Install
+	$(MAKE) -C $(HOST_BUILD_DIR) install
+endef
+
+define Host/Clean
+	-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+	$(call Host/Clean/Default)
+endef
+
+$(eval $(call HostBuild))
Index: tools/Makefile
===================================================================
--- tools/Makefile	(revision 24025)
+++ tools/Makefile	(working copy)
@@ -26,6 +26,7 @@
 tools-y += squashfs4 lzma
 endif
 tools-$(CONFIG_CCACHE) += ccache
+tools-$(CONFIG_CMAKE) += cmake
 
 ifdef CONFIG_GCC_USE_GRAPHITE
   ifeq ($(CONFIG_GCC_USE_SYSTEM_PPL_CLOOG),)
@@ -98,5 +99,5 @@
 $(curdir)/ := .config prereq
 $(curdir)//install = $(1)/compile
 
-$(eval $(call stampfile,$(curdir),tools,install,,CONFIG_CCACHE CONFIG_powerpc CONFIG_GCC_VERSION_4_3 CONFIG_GCC_USE_GRAPHITE CONFIG_TARGET_orion_generic))
+$(eval $(call stampfile,$(curdir),tools,install,,CONFIG_CCACHE CONFIG_CMAKE CONFIG_powerpc CONFIG_GCC_VERSION_4_3 CONFIG_GCC_USE_GRAPHITE CONFIG_TARGET_orion_generic))
 $(eval $(call subdir,$(curdir)))
Index: Config.in
===================================================================
--- Config.in	(revision 24025)
+++ Config.in	(working copy)
@@ -393,6 +393,12 @@
 		help
 		  Compiler cache; see http://ccache.samba.org/
 
+	config CMAKE
+		bool "Build CMake tool" if DEVEL
+		default n
+		help
+		  CMake tool; see http://www.cmake.org/
+
 	config EXTERNAL_KERNEL_TREE
 		string "Use external kernel tree" if DEVEL
 		default ""
