diff options
Diffstat (limited to 'unittests/Makefile.unittest')
-rw-r--r-- | unittests/Makefile.unittest | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 9a75b2c2eb..8be6174cb9 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -35,9 +35,11 @@ endif TESTLIBS = -lGoogleTest -lUnitTestMain ifeq ($(ENABLE_SHARED), 1) - # Add the absolute path to the dynamic library. This is ok because - # we'll never install unittests. - LD.Flags += $(RPATH) -Wl,$(SharedLibDir) + ifneq (,$(RPATH)) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) + endif # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most # of the time. Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" |