include/cmake.mk: fix host builds
authorFelix Fietkau <nbd@nbd.name>
Fri, 29 Jul 2016 20:47:46 +0000 (22:47 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 29 Jul 2016 20:47:46 +0000 (22:47 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/cmake.mk

index fac2bc0227b435a281123fe30f819e6efafc56ca..483a1510827b7496f53202ef615c71708c29de5c 100644 (file)
@@ -8,6 +8,7 @@ endif
 
 CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
 CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)
+HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)
 MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
 
 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
@@ -103,6 +104,6 @@ define Host/Configure/Default
                        -DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
                        -DCMAKE_SKIP_RPATH=TRUE  \
                        $(CMAKE_HOST_OPTIONS) \
-               $(CMAKE_SOURCE_DIR) \
+               $(HOST_CMAKE_SOURCE_DIR) \
        )
 endef