Skip to content

Commit f91a398

Browse files
committed
Adding OpenCV compilation backdoor
1 parent 8cc8c2f commit f91a398

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

modules/edge-detector/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ LIBS+=-lopencv_imgcodecs -lopencv_core -lopencv_highgui -lopencv_imgproc
88
# Source directories
99
INCDIR+=-I/usr/local/include/opencv4
1010
LIBDIR+=-L/usr/local/lib
11+
else
12+
CFLAGS += $(shell pkg-config --cflags opencv4)
13+
LFLAGS += $(shell pkg-config --libs opencv4)
1114
endif # INCLUDE_OPENCV
1215

1316
# Defining preprocessor directive for debug

modules/filter/Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# Adding stb lib for image handling
2-
CFLAGS_OPENCV := $(shell pkg-config --cflags opencv4)
3-
LFLAGS_OPENCV := $(shell pkg-config --libs opencv4)
4-
51
# Include common Makefile
62
include ../Makefile
73

8-
# Include stb lib for compilation
9-
CFLAGS += $(CFLAGS_OPENCV)
10-
LFLAGS += $(LFLAGS_OPENCV)
4+
# Include OpenCV for compilation
5+
CFLAGS += $(shell pkg-config --cflags opencv4)
6+
LFLAGS += $(shell pkg-config --libs opencv4)
117

128
# Defining preprocessor directive for debug
139
ifdef IPS_DEBUG_EN

modules/rgb2gray/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ LIBS+=-lopencv_imgcodecs -lopencv_core -lopencv_highgui -lopencv_imgproc
1010
# Source directories
1111
INCDIR+=-I$(OPENCV_H_DIR)
1212
LIBDIR+=-L$(OPENCV_SO_DIR)
13+
else
14+
CFLAGS += $(shell pkg-config --cflags opencv4)
15+
LFLAGS += $(shell pkg-config --libs opencv4)
1316
endif # INCLUDE_OPENCV
1417

1518
# Defining preprocessor directive for debug

0 commit comments

Comments
 (0)