mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-21 12:05:23 +00:00
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
This commit is contained in:
parent
b7c1f24f9b
commit
f3d5f6ccb0
@ -4,6 +4,8 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
|||||||
MAKE_FLAGS+=VERBOSE=1
|
MAKE_FLAGS+=VERBOSE=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CMAKE_SOURCE_DIR:=.
|
||||||
|
|
||||||
ifeq ($(CONFIG_CCACHE),)
|
ifeq ($(CONFIG_CCACHE),)
|
||||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||||
CMAKE_C_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)
|
CMAKE_C_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)
|
||||||
@ -53,8 +55,9 @@ define Build/Configure/Default
|
|||||||
-DCMAKE_STRIP=: \
|
-DCMAKE_STRIP=: \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DDL_LIBRARY=$(STAGING_DIR) \
|
-DDL_LIBRARY=$(STAGING_DIR) \
|
||||||
|
-DCMAKE_PREFIX_PATH=$(STAGING_DIR) \
|
||||||
$(CMAKE_OPTIONS) \
|
$(CMAKE_OPTIONS) \
|
||||||
. \
|
$(CMAKE_SOURCE_DIR) \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user