I am confused about how to setup the leap motion library together with OpenCV on Mac. I could use Leap Motion's library and OpenCV's separately, but when I try to extact the image out from the Leap Motion, I have to include OpenCV library. Basically, I am new to makefile, so I don't even know where to change to load it right. The below is the makefile that tutorial told me to use. From the past, I use terminal to call "make" and execute it.
OS := $(shell uname)
ARCH := $(shell uname -m)
ifeq ($(OS), Linux)
ifeq ($(ARCH), x86_64)
LEAP_LIBRARY := ../lib/x64/libLeap.so -Wl,-rpath,../lib/x64
else
LEAP_LIBRARY := ../lib/x86/libLeap.so -Wl,-rpath,../lib/x86
endif
else
# OS X
LEAP_LIBRARY := ../lib/libLeap.dylib
#opencv2 := /Users/chia-wei_Lin/Documents/Tactai/LeapMotion/LeapDeveloperKit_mac/TestLeapMotion/getImages/opencv2/opencv.hpp
endif
Sample: Sample.cpp
$(CXX) -Wall -g -I../include Sample.cpp -o Sample $(LEAP_LIBRARY)
ifeq ($(OS), Darwin)
install_name_tool -change @loader_path/libLeap.dylib ../lib/libLeap.dylib Sample
endif
clean:
rm -rf Sample Sample.dSYM