From 3e5f49435f95de57bffbde53d745dcb4a8f1f870 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20L=C3=B8ve=20Selvik?= Date: Tue, 13 Oct 2015 16:32:52 +0200 Subject: [PATCH] Add opencv_imgcodecs to library path in Makefile 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) --- Makefile | 7 ++++++- Makefile.config.example | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5fb6394..43cb15f 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Makefile.config.example b/Makefile.config.example index a20bad2..8e2c4fb 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -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++ -- 2.7.4