3 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
9 ifeq ($(CONFIG_CCACHE),)
10 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
11 CMAKE_C_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)
12 CMAKE_C_COMPILER_ARG1:=
13 CMAKE_CXX_COMPILER:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)
14 CMAKE_CXX_COMPILER_ARG1:=
16 CMAKE_C_COMPILER:=$(shell which $(TARGET_CC))
17 CMAKE_C_COMPILER_ARG1:=
18 CMAKE_CXX_COMPILER:=$(shell which $(TARGET_CXX))
19 CMAKE_CXX_COMPILER_ARG1:=
22 CCACHE:=$(shell which ccache)
24 CCACHE:=$(STAGING_DIR_HOST)/bin/ccache
26 CMAKE_C_COMPILER:=$(CCACHE)
27 CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE)
28 CMAKE_CXX_COMPILER:=$(CCACHE)
29 CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE)
32 define Build/Configure/Default
33 (cd $(PKG_BUILD_DIR); \
34 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
35 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
36 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
38 -DCMAKE_SYSTEM_NAME=Linux \
39 -DCMAKE_SYSTEM_VERSION=1 \
40 -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
41 -DCMAKE_BUILD_TYPE=Release \
42 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
43 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
44 -DCMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \
45 -DCMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \
46 -DCMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \
47 -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \
48 -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
49 -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
50 -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
51 -DCMAKE_FIND_ROOT_PATH="$(STAGING_DIR);$(TOOLCHAIN_DIR)" \
52 -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH \
53 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
54 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
56 -DCMAKE_INSTALL_PREFIX=/usr \
57 -DDL_LIBRARY=$(STAGING_DIR) \
58 -DCMAKE_PREFIX_PATH=$(STAGING_DIR) \
64 define Build/InstallDev/cmake
66 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
69 Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))