]> git.sesse.net Git - nageru/blobdiff - meson.build
Matroska hacks.
[nageru] / meson.build
index 6325d5a2d561a130e8242ced99a2b19d9be6303d..69759cb43baf35b6ecdedb46fcc1f4482a8d37ca 100644 (file)
@@ -1,4 +1,4 @@
-project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '2.0.1')
+project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '2.1.0')
 
 cxx = meson.get_compiler('cpp')
 qt5 = import('qt5')
@@ -15,6 +15,7 @@ libavcodecdep = dependency('libavcodec')
 libavformatdep = dependency('libavformat')
 libswresampledep = dependency('libswresample')
 libavutildep = dependency('libavutil')
+libdrmdep = dependency('libdrm')
 libjpegdep = dependency('libjpeg')
 libswscaledep = dependency('libswscale')
 libusbdep = dependency('libusb-1.0')
@@ -73,7 +74,7 @@ nageru_srcs = []
 nageru_deps = [shareddep, qt5deps, libjpegdep, movitdep, protobufdep,
        vax11dep, vadrmdep, x11dep, libavformatdep, libswresampledep, libavcodecdep, libavutildep,
        libswscaledep, libusbdep, luajitdep, dldep, x264dep, alsadep, zitaresamplerdep,
-       qcustomplotdep, threaddep, eigendep, srtdep]
+       qcustomplotdep, threaddep, eigendep, srtdep, libdrmdep]
 nageru_include_dirs = [include_directories('nageru')]
 nageru_link_with = []
 nageru_build_rpath = ''
@@ -105,9 +106,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
@@ -130,7 +128,7 @@ if have_cef
        endif
 
        cef_libs = ['libEGL.so', 'libGLESv2.so', 'snapshot_blob.bin', 'v8_context_snapshot.bin']
-       cef_resources = ['cef.pak', 'cef_100_percent.pak', 'cef_200_percent.pak', 'cef_extensions.pak', 'devtools_resources.pak']
+       cef_resources = ['chrome_100_percent.pak', 'chrome_200_percent.pak', 'resources.pak']
        if not get_option('cef_no_icudtl')
                cef_resources += ['icudtl.dat']
        endif
@@ -150,6 +148,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.
@@ -259,7 +264,7 @@ executable('nageru', 'nageru/main.cpp',
 meson.add_install_script('nageru/scripts/setup_nageru_symlink.sh')
 
 # Kaeru executable.
-executable('kaeru', 'nageru/kaeru.cpp',
+executable('kaeru', ['nageru/kaeru.cpp', 'nageru/nageru_cef_app.cpp'],
        dependencies: [nageru_deps, kaeru_extra_deps],
        include_directories: nageru_include_dirs,
        link_with: [stream, aux, kaeru_link_with],