]> git.sesse.net Git - nageru/commitdiff
Make the SDL dependencies optional.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Dec 2018 15:50:30 +0000 (16:50 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Dec 2018 15:50:30 +0000 (16:50 +0100)
meson.build

index 417f28625a5c169ff8b149501d6c9f58f6af70fc..16a604e60ebc7908852af15f8284d60637e1a1a9 100644 (file)
@@ -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')
@@ -314,6 +314,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')