summaryrefslogtreecommitdiffstats
path: root/include/cmake.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-29 11:12:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-12-29 11:12:31 +0000
commitf3d5f6ccb03863118efcc199d0a9429440af62c1 (patch)
tree84a33de9ba5204f494fe748bdba53408c8d7931c /include/cmake.mk
parentb7c1f24f9bd430b42ff99b4712e0f43e4ca10034 (diff)
downloadmaster-31e0f0ae-f3d5f6ccb03863118efcc199d0a9429440af62c1.tar.gz
master-31e0f0ae-f3d5f6ccb03863118efcc199d0a9429440af62c1.tar.bz2
master-31e0f0ae-f3d5f6ccb03863118efcc199d0a9429440af62c1.zip
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)
SVN-Revision: 34914
Diffstat (limited to 'include/cmake.mk')
-rw-r--r--include/cmake.mk5
1 files changed, 4 insertions, 1 deletions
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