From: Steinar H. Gunderson Date: Mon, 9 Nov 2020 19:24:25 +0000 (+0100) Subject: Link to libcef.so in the current directory. X-Git-Tag: 2.0.2~18 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=e1dc8c1d1d8a6082e0e28c444fe6ef73548f6035 Link to libcef.so in the current directory. Newer CEF hard-codes that icudtl.dat _must_ be in the same directory as libcef.so, but the release tarballs have a different structure, so this fails. This should be fine on installs, but it won't work for running Nageru from the build directory. Search for the library in the local directory instead, where we have a symlink. This makes the build rpath point to ., which makes sure icudtl.dat is picked up from the other symlink. --- diff --git a/meson.build b/meson.build index 6325d5a..a335f73 100644 --- a/meson.build +++ b/meson.build @@ -105,9 +105,6 @@ if have_cef nageru_install_rpath = '$ORIGIN/' endif - cefdep = cxx.find_library('cef', dirs: cef_lib_dir) - nageru_deps += cefdep - # CEF wrapper library; not built as part of the CEF binary distribution, # but should be if CEF is installed as a system library. if system_cef @@ -150,6 +147,13 @@ if have_cef endforeach run_command('ln', '-s', join_paths(cef_resource_dir, 'locales/en-US.pak'), join_paths(meson.current_build_dir(), 'locales/')) install_data(join_paths(cef_resource_dir, 'locales/en-US.pak'), install_dir: join_paths(exe_dir, 'locales')) + + # NOTE: We link against libcef.so in the local directory, _not_ in the CEF directory, + # since upstream CEF searches for icudtl.dat in whatever path dladdr() says libcef.so + # comes from, and the upstream CEF tarballs have libcef.so and icudtl.dat in different + # directories. Thus, get both from the local symlinks we just created. + cefdep = cxx.find_library('cef', dirs: meson.current_build_dir()) + nageru_deps += cefdep endif # bmusb.