diff --git a/build/rules/global b/build/rules/global index 1e51d3d77..4cd27ef3b 100644 --- a/build/rules/global +++ b/build/rules/global @@ -238,10 +238,15 @@ ifndef LIBPREFIX LIBPREFIX = lib endif -ifeq ($(POCO_HOST_OSNAME),Darwin) -SET_LD_LIBRARY_PATH = DYLD_LIBRARY_PATH=$(LIBPATH) +ifeq ($(LIBPATH),$(POCO_BASE)/$(LIBDIR)) +LD_LIBRARY_PATH = $(LIBPATH) else -SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH=$(LIBPATH) +LD_LIBRARY_PATH = $(LIBPATH):$(POCO_BASE)/$(LIBDIR) +endif +ifeq ($(POCO_HOST_OSNAME),Darwin) +SET_LD_LIBRARY_PATH = DYLD_LIBRARY_PATH=$(LD_LIBRARY_PATH) +else +SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) endif #