Merge pull request #3186 from lionleaf/makefile_opencv_imgcodecs
authorRonghang Hu <huronghang@hotmail.com>
Thu, 22 Oct 2015 22:17:26 +0000 (15:17 -0700)
committerRonghang Hu <huronghang@hotmail.com>
Thu, 22 Oct 2015 22:17:26 +0000 (15:17 -0700)
Add opencv_imgcodecs to library path in Makefile

1  2 
Makefile
Makefile.config.example

diff --combined Makefile
+++ b/Makefile
@@@ -184,7 -184,12 +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
@@@ -313,9 -318,6 +318,9 @@@ ifeq ($(USE_LEVELDB), 1
  endif
  ifeq ($(USE_LMDB), 1)
        COMMON_FLAGS += -DUSE_LMDB
 +ifeq ($(ALLOW_LMDB_NOLOCK), 1)
 +      COMMON_FLAGS += -DALLOW_LMDB_NOLOCK
 +endif
  endif
  
  # CPU-only configuration
diff --combined Makefile.config.example
@@@ -8,15 -8,13 +8,18 @@@
  # CPU_ONLY := 1
  
  # uncomment to disable IO dependencies and corresponding data layers
 +# USE_OPENCV := 0
  # USE_LEVELDB := 0
  # USE_LMDB := 0
 -# USE_OPENCV := 0
 +
 +# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
 +#     You should not set this flag if you will be reading LMDBs with any
 +#     possibility of simultaneous read and write
 +# ALLOW_LMDB_NOLOCK := 1
  
+ # 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++