mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-14 01:07:57 +08:00
Set rpath on cxx-generate-packed-data so we don't need to set LD_LIBRARY_PATH
This commit sets the 'build_rpath' argument on the cxx-generate-packed-data executable to the protobuf library's libdir, which supports the use case where the protobuf library is installed into a non-default path. For instance, in the CI environment protobuf is installed into a subdirectory of $HOME, which is not searched by the runtime linker. This approach was recommended on the mesonbuild mailing list.
This commit is contained in:
parent
01973fb2fb
commit
0c3c6d8f9a
@ -19,7 +19,6 @@ env:
|
||||
global:
|
||||
- PROTOBUF_VERSION=3.6.1
|
||||
- PKG_CONFIG_PATH=$HOME/protobuf-$PROTOBUF_VERSION-bin/lib/pkgconfig
|
||||
- LD_LIBRARY_PATH=$HOME/protobuf-$PROTOBUF_VERSION-bin/lib
|
||||
|
||||
install:
|
||||
- pip3 install meson
|
||||
|
@ -199,7 +199,8 @@ if get_option('build-compiler') and get_option('run-tests')
|
||||
executable('cxx-generate-packed-data', 't/generated-code2/cxx-generate-packed-data.cc',
|
||||
gen_protobuf.process('t/test-full.proto',
|
||||
preserve_path_from : meson.current_source_dir()),
|
||||
dependencies : protobuf),
|
||||
dependencies : protobuf,
|
||||
build_rpath : protobuf.get_pkgconfig_variable('libdir')),
|
||||
capture : true)
|
||||
|
||||
test('generated-code2',
|
||||
|
Loading…
x
Reference in New Issue
Block a user