X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=meson.build;h=2a594c7d4f88c070bb315eacfd2613146a2958b7;hb=0a3ea4312599886108fbd12e389ed3504c4dae60;hp=417f28625a5c169ff8b149501d6c9f58f6af70fc;hpb=1501c53153cb0daa846e4de7a73cfbfc797fd543;p=nageru diff --git a/meson.build b/meson.build index 417f286..2a594c7 100644 --- a/meson.build +++ b/meson.build @@ -22,8 +22,8 @@ movitdep = dependency('movit') protobufdep = dependency('protobuf') qcustomplotdep = cxx.find_library('qcustomplot') qt5deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGLExtensions', 'OpenGL', 'Network']) -sdl2_imagedep = dependency('SDL2_image') -sdl2dep = dependency('sdl2') +sdl2_imagedep = dependency('SDL2_image', required: false) +sdl2dep = dependency('sdl2', required: false) sqlite3dep = dependency('sqlite3') threaddep = dependency('threads') vadrmdep = dependency('libva-drm') @@ -41,11 +41,8 @@ if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD') endif # Add the right MOVIT_SHADER_DIR definition. -r = run_command('pkg-config', '--variable=shaderdir', 'movit') -if r.returncode() != 0 - error('Movit pkg-config installation is broken.') -endif -add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp') +movit_shader_dir = movitdep.get_pkgconfig_variable('shaderdir') +add_project_arguments('-DMOVIT_SHADER_DIR="' + movit_shader_dir + '"', language: 'cpp') # Make the Nageru version available as a #define. add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp') @@ -151,10 +148,10 @@ endif # bmusb. if embedded_bmusb - bmusb_dir = include_directories('bmusb') + bmusb_dir = include_directories('nageru/bmusb') nageru_include_dirs += bmusb_dir - bmusb = static_library('bmusb', 'bmusb/bmusb.cpp', 'bmusb/fake_capture.cpp', + bmusb = static_library('bmusb', 'nageru/bmusb/bmusb.cpp', 'nageru/bmusb/fake_capture.cpp', dependencies: [libusbdep], include_directories: [bmusb_dir]) nageru_link_with += bmusb @@ -314,6 +311,8 @@ executable('futatabi', futatabi_srcs, install: true) # Test binaries for the optical flow code. -executable('flow', 'futatabi/flow_main.cpp', 'futatabi/flow.cpp', 'futatabi/gpu_timers.cpp', futatabi_shader_srcs, dependencies: [shareddep, epoxydep, sdl2dep, sdl2_imagedep]) +if sdl2dep.found() and sdl2_imagedep.found() + executable('flow', 'futatabi/flow_main.cpp', 'futatabi/flow.cpp', 'futatabi/gpu_timers.cpp', futatabi_shader_srcs, dependencies: [shareddep, epoxydep, sdl2dep, sdl2_imagedep]) +endif executable('eval', 'futatabi/eval.cpp', 'futatabi/util.cpp') executable('vis', 'futatabi/vis.cpp', 'futatabi/util.cpp')