X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=meson.build;h=7214f27b24dc4ee0a2440d00bffda706e6c6482c;hb=374ba46ea92dd403039b9a58237ddb84a5f93620;hp=417f28625a5c169ff8b149501d6c9f58f6af70fc;hpb=1501c53153cb0daa846e4de7a73cfbfc797fd543;p=nageru diff --git a/meson.build b/meson.build index 417f286..7214f27 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') @@ -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')