Skip to content

Commit

Permalink
embeded G4 lib path in rpath in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jintonic committed Dec 12, 2023
1 parent b542312 commit 91ea803
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ LDLIBS=$(shell geant4-config --libs)
ifeq (11.1.0, $(shell geant4-config --version))
LDLIBS+=-lG4ToolsSG
endif
# imbed Geant4 lib path to rpath on MacOS
# https://stackoverflow.com/a/12099167/1801749
# https://stackoverflow.com/a/6638539/1801749
ifeq (Darwin, $(shell uname -s))
LDLIBS+="-Wl,-rpath,$(shell geant4-config --prefix)/lib"
endif

# In case that Xerces-c and HDF5 libs are in LD_LIBRARY_PATH
# add them in the LDLIBS flag. (Fixme: macOS doesn't use LD_LIBRARY_PATH)
Expand Down

0 comments on commit 91ea803

Please sign in to comment.