Skip to content

Commit

Permalink
Merge pull request #15 from mengzhibin/master
Browse files Browse the repository at this point in the history
fix opencv lib link bug
  • Loading branch information
XingangPan committed Aug 14, 2019
2 parents f7cb48b + 08c4a07 commit 2cabaca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ COMMON_FLAGS := -DCPU_ONLY
CXXFLAGS := -std=c++11 -fopenmp
LDFLAGS := -fopenmp -Wl,-rpath,./lib

OPENCV = `pkg-config opencv --cflags --libs`
LIB = $(OPENCV)
BUILD_DIR := build

# make rules -------------------------------
Expand Down Expand Up @@ -37,7 +39,7 @@ $(BUILD_DIR)/%.o: %.cpp | $(ALL_BUILD_DIRS)

$(PROJECT_NAME): $(CXX_TARGETS)
@echo "CXX/LD" $@
@$(CXX) -o $@ $^ $(LDFLAGS)
@$(CXX) -o $@ $^ $(LDFLAGS) ${LIB}

.PHONY: clean
clean:
Expand Down

0 comments on commit 2cabaca

Please sign in to comment.