Skip to content

Commit

Permalink
Add opencv_imgcodecs to library path in Makefile
Browse files Browse the repository at this point in the history
Project does not compile without opencv_imgcodecs in the library path if
you're using OpenCV 3.

This introduces a OPENCV_VERSION flag in Makefile.config that includes
the library if set to 3.  (Trying to include it with OpenCV 2 also
breaks the build)
  • Loading branch information
lionleaf committed Oct 22, 2015
1 parent 0151742 commit 3e5f494
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,12 @@ ifeq ($(USE_LMDB), 1)
LIBRARIES += lmdb
endif
ifeq ($(USE_OPENCV), 1)
LIBRARIES += opencv_core opencv_highgui opencv_imgproc
LIBRARIES += opencv_core opencv_highgui opencv_imgproc

ifeq ($(OPENCV_VERSION), 3)
LIBRARIES += opencv_imgcodecs
endif

endif
PYTHON_LIBRARIES := boost_python python2.7
WARNINGS := -Wall -Wno-sign-compare
Expand Down
3 changes: 3 additions & 0 deletions Makefile.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# USE_LMDB := 0
# USE_OPENCV := 0

# Uncomment if you're using OpenCV 3
# OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++
Expand Down

0 comments on commit 3e5f494

Please sign in to comment.