fix(rpath): fixed macos RPATH bug'
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# *********************************************************************** #
|
||||
project('libconstants', 'cpp', version: 'v1.1.6', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
project('libconstants', 'cpp', version: 'v1.1.7', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
|
||||
# Add default visibility for all C++ targets
|
||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||
|
||||
@@ -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