fix(rpath): fixed macos RPATH bug'
This commit is contained in:
@@ -4,14 +4,18 @@ const_sources = files(
|
||||
)
|
||||
|
||||
|
||||
# Define the libconst library so it can be linked against by other parts of the build system
|
||||
samedir_rpath = host_machine.system() == 'darwin' ? '@loader_path' : '$ORIGIN'
|
||||
|
||||
libconst = library('const',
|
||||
const_sources,
|
||||
const_sources,
|
||||
include_directories: include_directories('include'),
|
||||
cpp_args: ['-fvisibility=default'],
|
||||
dependencies: [const_data_dep],
|
||||
install : true,
|
||||
install_dir: constants_libdir)
|
||||
install_dir: constants_libdir,
|
||||
install_rpath: samedir_rpath,
|
||||
build_rpath: samedir_rpath
|
||||
)
|
||||
|
||||
const_dep = declare_dependency(
|
||||
include_directories: include_directories('include'),
|
||||
@@ -23,4 +27,8 @@ const_headers = files(
|
||||
'include/fourdst/constants/const.h'
|
||||
)
|
||||
|
||||
install_headers(const_headers, install_dir: constants_header_install_dir)
|
||||
if get_option('build_python')
|
||||
install_data(const_headers, install_dir: constants_header_install_dir)
|
||||
else
|
||||
install_headers(const_headers, install_dir: constants_header_install_dir)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user