5 ifeq ($(CONFIG_CCACHE
),)
6 CMAKE_C_COMPILER
:=$(TOOLCHAIN_DIR
)/bin
/$(TARGET_CC
)
7 CMAKE_C_COMPILER_ARG1
:=
8 CMAKE_CXX_COMPILER
:=$(TOOLCHAIN_DIR
)/bin
/$(TARGET_CXX
)
9 CMAKE_CXX_COMPILER_ARG1
:=
11 CMAKE_C_COMPILER
:=$(STAGING_DIR_HOST
)/bin
/ccache
12 CMAKE_C_COMPILER_ARG1
:=$(filter-out ccache
,$(TARGET_CC
))
13 CMAKE_CXX_COMPILER
:=$(STAGING_DIR_HOST
)/bin
/ccache
14 CMAKE_CXX_COMPILER_ARG1
:=$(filter-out ccache
,$(TARGET_CXX
))
17 define Build
/Configure
/Default
18 (cd
$(PKG_BUILD_DIR
); \
19 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
20 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
22 -DCMAKE_SYSTEM_NAME
=Linux \
23 -DCMAKE_SYSTEM_VERSION
=1 \
24 -DCMAKE_SYSTEM_PROCESSOR
=$(ARCH
) \
25 -DCMAKE_BUILD_TYPE
=Release \
26 -DCMAKE_C_FLAGS_RELEASE
="-DNDEBUG" \
27 -DCMAKE_CXX_FLAGS_RELEASE
="-DNDEBUG" \
28 -DCMAKE_C_COMPILER
="$(CMAKE_C_COMPILER)" \
29 -DCMAKE_C_COMPILER_ARG1
="$(CMAKE_C_COMPILER_ARG1)" \
30 -DCMAKE_CXX_COMPILER
="$(CMAKE_CXX_COMPILER)" \
31 -DCMAKE_CXX_COMPILER_ARG1
="$(CMAKE_CXX_COMPILER_ARG1)" \
32 -DCMAKE_EXE_LINKER_FLAGS
="$(TARGET_LDFLAGS)" \
33 -DCMAKE_MODULE_LINKER_FLAGS
="$(TARGET_LDFLAGS)" \
34 -DCMAKE_SHARED_LINKER_FLAGS
="$(TARGET_LDFLAGS)" \
35 -DCMAKE_FIND_ROOT_PATH
=$(STAGING_DIR
) \
36 -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM
=$(STAGING_DIR_HOST
) \
37 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY
=$(STAGING_DIR
) \
38 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE
=$(STAGING_DIR
) \
40 -DCMAKE_INSTALL_PREFIX
=/usr \
46 define Build
/InstallDev
/cmake
48 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
51 Build
/InstallDev
= $(if
$(CMAKE_INSTALL
),$(Build
/InstallDev
/cmake
))