LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

OpenCV dependency #3

Closed drinkingkazu closed 8 years ago

drinkingkazu commented 8 years ago

There are inconsistency handling of OpenCV dependency. Original intent (which I plan to follow) is: 0) shell environment variable OPENCV_INCDIR and OPENCV_LIBDIR must be defined each pointing to a conventional top directory path to headers and libraries of opencv. 1) when 0) is satisfied, configure.sh sets LARCV_OPENCV environment variable to 1 (or 0 otherwise). This should be used in package makefile to judge whether or not to use OpenCV.

Issue made apparent by Tari: we should set a compiler variable to set compiler guards in source codes.

drinkingkazu commented 8 years ago

Now fixed:

a) Build system put -DUSE_OPENCV if $LARCV_OPENCV is set to 1. b) larcv-config --libs now automatically appends "-L${OPENCV_LIBDIR} -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs" c) modified relevant package GNUmakefile to just use LDFLAGS += $(shell larcv-config --libs) d) modified relevant source code to use a compiler guard statements for CV related part