v0.16.0
Loading...
Searching...
No Matches
PatchMFrontMakefile.cmake
Go to the documentation of this file.
1if(NOT DEFINED MAKEFILE)
2 message(FATAL_ERROR "MAKEFILE is not defined")
3endif()
4
5file(READ "${MAKEFILE}" makefile_content)
6
7set(rpath_guard [=[
8 otool -l $@ | grep -F "$(shell tfel-config --library-path)" >/dev/null || install_name_tool -add_rpath $(shell tfel-config --library-path) $@
9]=])
10
11string(REGEX REPLACE
12 "\n\tinstall_name_tool -add_rpath[^\n]*"
13 "\n${rpath_guard}"
14 makefile_content
15 "${makefile_content}")
16
17file(WRITE "${MAKEFILE}" "${makefile_content}")