cmake.mk: add support for overriding the source dir, and define the cmake prefix...
authorFelix Fietkau <nbd@openwrt.org>
Sat, 29 Dec 2012 11:12:31 +0000 (11:12 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 29 Dec 2012 11:12:31 +0000 (11:12 +0000)
SVN-Revision: 34914

include/cmake.mk

index 4c4af502cc3889955c5ad69aef78f8f97cf54bb1..64a0654f9685004de625b22279ac58596105cc1b 100644 (file)
@@ -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