Merge pull request #4032 from mshabunin:fix-pkg-config
This commit is contained in:
12
samples/cpp/example_cmake/Makefile
Normal file
12
samples/cpp/example_cmake/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
CXX ?= g++
|
||||
|
||||
CXXFLAGS += -c -Wall $(shell pkg-config --cflags opencv)
|
||||
LDFLAGS += $(shell pkg-config --libs --static opencv)
|
||||
|
||||
all: opencv_example
|
||||
|
||||
opencv_example: example.o; $(CXX) $< -o $@ $(LDFLAGS)
|
||||
|
||||
%.o: %.cpp; $(CXX) $< -o $@ $(CXXFLAGS)
|
||||
|
||||
clean: ; rm -f example.o opencv_example
|
Reference in New Issue
Block a user