Skip to content

Commit 7ca97b4

Browse files
committed
Enable HAVE_XFEATURES2D
1 parent 0ad9060 commit 7ca97b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Makevars.win

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
PKG_CONFIG_NAME = opencv4
22
PKG_CONFIG ?= $(BINPREF)pkg-config
33
PKG_LIBS := $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_NAME))
4+
STATIC_CFLAGS = -DHAVE_XFEATURES2D
45

5-
ifneq ($(findstring wechat,$(PKG_LIBS)),)
6+
ifneq ($(findstring xfeatures2d,$(PKG_LIBS)),)
67
$(info using $(PKG_CONFIG_NAME) from Rtools)
7-
PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME))
8+
PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME)) $(STATIC_CFLAGS)
89
OPENCVDATA := $(shell $(PKG_CONFIG) --variable=prefix $(PKG_CONFIG_NAME))/share/opencv4
910
else
1011
RWINLIB = ../windows/opencv
11-
PKG_CPPFLAGS = -I$(RWINLIB)/include/opencv4 -DHAVE_XFEATURES2D
12+
PKG_CPPFLAGS = -I$(RWINLIB)/include/opencv4 $(STATIC_CFLAGS)
1213
OLDLIBDIR = lib${subst gcc,,${COMPILED_BY}}${R_ARCH}
1314
PKG_LIBS = \
1415
-L$(RWINLIB)/$(OLDLIBDIR) \

0 commit comments

Comments
 (0)