Skip to content

Commit

Permalink
depends: hidapi: build with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Oct 5, 2023
1 parent cda8005 commit 488de9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contrib/depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
CXX="$$($(1)_cxx)" \
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
LDFLAGS="$$($(1)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_cmake_opts)
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
ifeq ($($(1)_type),build)
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
else
Expand Down
15 changes: 2 additions & 13 deletions contrib/depends/packages/hidapi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ $(package)_sha256_hash=a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf
$(package)_linux_dependencies=libusb eudev

define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
$(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
$(package)_config_opts_linux+=--with-pic
$(package)_config_opts+=-DBUILD_SHARED_LIBS=OFF
endef

define $(package)_config_cmds
./bootstrap &&\
$($(package)_autoconf) $($(package)_config_opts)
$($(package)_cmake) .
endef

define $(package)_build_cmds
Expand All @@ -27,7 +20,3 @@ endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

define $(package)_postprocess_cmds
rm lib/*.la
endef

0 comments on commit 488de9d

Please sign in to comment.