这个是我需要编译到系统中的库:https://github.com/libuvc/libuvc
这个库使用的是CMakeLists编译的,我不太会写顶层的makefile,而且libuvc在编译的过程中需要依赖 libc libjpeg libusb-1.0 这三个库,我尝试添加到makefile中但依然报错,请问各位大佬我应该如何修改呢
include $(TOPDIR)/rules.mk
PKG_NAME:=libuvc
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/libuvc
SUBMENU:=Other
SECTION:=utils
CATEGORY:=Allwinner
TITLE:= Libuvc
DEPENDS:=+libc +libjpeg +libusb-1.0
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Configure
# 这里是cmake生成makefile的代码
endef
define Build/Compile
# 这里是编译makefile的代码
endef
define Package/libuvc/install
# 这里安装到系统
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libuvc.a $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libuvc.so.0.0.6 $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libuvc.so $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libuvc.so.0 $(1)/usr/lib
endef
$(eval $(call BuildPackage,libuvc))