CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR);$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
+CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR_HOST)
define Build/Configure/Default
(cd $(PKG_BUILD_DIR); \
endef
Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))
+
+define Host/Configure/Default
+ (cd $(HOST_BUILD_DIR); \
+ CFLAGS="$(HOST_CFLAGS)" \
+ CXXFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
+ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
+ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+ -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+ -DCMAKE_FIND_ROOT_PATH="$(CMAKE_HOST_FIND_ROOT_PATH)" \
+ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH \
+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
+ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
+ -DCMAKE_STRIP=: \
+ -DCMAKE_INSTALL_PREFIX=$(STAGING_DIR_HOST) \
+ -DCMAKE_PREFIX_PATH=$(STAGING_DIR_HOST) \
+ -DCMAKE_SKIP_RPATH=TRUE \
+ $(CMAKE_HOST_OPTIONS) \
+ $(CMAKE_SOURCE_DIR) \
+ )
+endef