Greetings,
FreeBSD stable/13, meson 0.57.1
I am looking for best practice to deal with my problem of trying
to build a drogon project executable with meson.
In the relevant meson.build file I have:
#exe_vultr_api_deps = dependency('Drogon', method : 'cmake', modules : ['Drogon::Drogon'])
exe_vultr_api_deps = dependency('Drogon', method : 'cmake')
var = exe_vultr_api_deps.get_variable(cmake : 'DROGON_LIBRARIES')
message('DROGON_LIBRARIES: ', var)
Which in either dependency() case above yields:
Found CMake: /usr/local/bin/cmake (3.19.6)
Run-time dependency drogon found: YES 1.4.1
Message: DROGON_LIBRARIES: Drogon::Drogon
This means in practice that an executable linked by, say:
exe_vultr_api = executable('vultr_api', src_vultr_api,
include_directories: project_include_directories,
link_with: lib_demeisen_so,
dependencies: exe_vultr_api_deps)
results in an executable that ldd shows:
vultr_api:
libdrogon.so => not found (0)
libtrantor.so => not found (0)
libjsoncpp.so.24 => /usr/local/lib/libjsoncpp.so.24 (0x80024d000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x80028e000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x800360000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800382000)
libc.so.7 => /lib/libc.so.7 (0x80039b000)
libm.so.5 => /lib/libm.so.5 (0x8007ac000)
However on this platform drogon correctly rpaths it's dependent
libraries into the drogon_ctl executable for the installation prefix
path I am using: ~/.local.
Am I making an elementary mistake? I apologize if so, but if
otherwise, I would be interested to know what people do here.
I am not above just setting up some fragile hard coded paths
to look for particular libraries because for deployment reasons
I really want to rely on ~/.local.
Thanks,
Russell