Merge pull request #576 from pettyalex/macos-relative-linker-path

Enable rpath with Mac OS linker
This commit is contained in:
Yamagi 2020-06-02 08:29:18 +02:00 committed by GitHub
commit 486441eb0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -335,6 +335,7 @@ config:
@echo "WITH_OPENAL = $(WITH_OPENAL)"
@echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
@echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
@echo "WITH_RPATH = $(WITH_RPATH)"
@echo "============================"
@echo ""
@ -426,9 +427,13 @@ release/quake2 : LDFLAGS += -lexecinfo
endif
ifeq ($(WITH_RPATH),yes)
ifeq ($(YQ2_OSTYPE), Darwin)
release/quake2 : LDFLAGS += -Wl,-rpath,'@executable_path/lib'
else
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
endif
endif
endif
# ----------