summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-29 11:12:31 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-29 11:12:31 +0000
commit1565cab1a6768fb773972fea9836e58821d0d64a (patch)
tree7196c3fc42ac1d44a4a6d82b21e954a431b26eb3
parentbeb98de5295e2ea974d687477cbe86b46c538064 (diff)
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)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34914 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/cmake.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/cmake.mk b/include/cmake.mk
index 4c4af502c..64a0654f9 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