From e960fdb891f49dd24c9c92756284298263993d58 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 17 May 2013 14:19:36 +0000 Subject: [PATCH] cmake.mk: add support for overriding the source dir, and define the cmake prefix path to avoid picking up host libraries for target builds (patch by Henning Rogge) Backport of r34914 SVN-Revision: 36652 --- include/cmake.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/cmake.mk b/include/cmake.mk index 4c4af502cc..64a0654f96 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -4,6 +4,8 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) MAKE_FLAGS+=VERBOSE=1 endif +CMAKE_SOURCE_DIR:=. + ifeq ($(CONFIG_CCACHE),) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) CMAKE_C_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC) @@ -53,8 +55,9 @@ define Build/Configure/Default -DCMAKE_STRIP=: \ -DCMAKE_INSTALL_PREFIX=/usr \ -DDL_LIBRARY=$(STAGING_DIR) \ + -DCMAKE_PREFIX_PATH=$(STAGING_DIR) \ $(CMAKE_OPTIONS) \ - . \ + $(CMAKE_SOURCE_DIR) \ ) endef -- 2.30.2