]> git.sesse.net Git - nageru/commitdiff
Link to libcef.so in the current directory.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2020 19:24:25 +0000 (20:24 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 9 Nov 2020 19:27:46 +0000 (20:27 +0100)
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.

meson.build

index 6325d5a2d561a130e8242ced99a2b19d9be6303d..a335f738507a31bb78dbf95a224d3e5f1768b41d 100644 (file)
@@ -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.