зеркало из https://github.com/microsoft/caffe.git
Reintroduce pkg-config with optional Makefile.config flag.
This commit is contained in:
Родитель
39341b70a2
Коммит
8944b7addc
9
Makefile
9
Makefile
|
@ -329,7 +329,14 @@ NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
|
|||
# mex may invoke an older gcc that is too liberal with -Wuninitalized
|
||||
MATLAB_CXXFLAGS := $(CXXFLAGS) -Wno-uninitialized
|
||||
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
|
||||
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) \
|
||||
|
||||
USE_PKG_CONFIG ?= 0
|
||||
ifeq ($(USE_PKG_CONFIG), 1)
|
||||
PKG_CONFIG := $(shell pkg-config opencv --libs)
|
||||
else
|
||||
PKG_CONFIG :=
|
||||
endif
|
||||
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(PKG_CONFIG) \
|
||||
$(foreach library,$(LIBRARIES),-l$(library))
|
||||
PYTHON_LDFLAGS := $(LDFLAGS) $(foreach library,$(PYTHON_LIBRARIES),-l$(library))
|
||||
|
||||
|
|
|
@ -60,6 +60,10 @@ PYTHON_LIB := /usr/lib
|
|||
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
|
||||
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
|
||||
|
||||
# Uncomment to use `pkg-config` to specify OpenCV library paths.
|
||||
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
|
||||
# USE_PKG_CONFIG := 1
|
||||
|
||||
BUILD_DIR := build
|
||||
DISTRIBUTE_DIR := distribute
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче