X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=meson.build;h=1bcd96953dc9fcb71a8c14e864c4d8ad576dfaf4;hp=ac82c3ea1a1fb2d8f0f78fdecd166f4af28cc921;hb=911fc5867669e9808da80140b24c819b05471f73;hpb=a6f3a2275ad116e6ab338e583ab8ef1b1141b468 diff --git a/meson.build b/meson.build index ac82c3e..1bcd969 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '1.8.1') +project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '1.9.3') cxx = meson.get_compiler('cpp') qt5 = import('qt5') @@ -9,6 +9,7 @@ embedded_bmusb = get_option('embedded_bmusb') alsadep = dependency('alsa') bmusbdep = dependency('bmusb', required: not embedded_bmusb) dldep = cxx.find_library('dl') +eigendep = dependency('eigen3') epoxydep = dependency('epoxy') libavcodecdep = dependency('libavcodec') libavformatdep = dependency('libavformat') @@ -24,6 +25,7 @@ qcustomplotdep = cxx.find_library('qcustomplot') qt5deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGLExtensions', 'OpenGL', 'Network']) sdl2_imagedep = dependency('SDL2_image', required: false) sdl2dep = dependency('sdl2', required: false) +srtdep = dependency('srt', required: false) sqlite3dep = dependency('sqlite3') threaddep = dependency('threads') vadrmdep = dependency('libva-drm') @@ -47,11 +49,20 @@ add_project_arguments('-DMOVIT_SHADER_DIR="' + movit_shader_dir + '"', language: # Make the Nageru version available as a #define. add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp') +# Make the prefix (e.g. /usr/local) available as a #define. +add_project_arguments('-DPREFIX="' + get_option('prefix') + '"', language: 'cpp') + # This needs to be done before declaring any build targets. if get_option('cef_dir') != '' add_project_arguments('-DHAVE_CEF=1', language: 'cpp') endif +if srtdep.found() + # NOTE: Seemingly there's no way to figure out if we have OpenSSL libsrt + # or gnutls libsrt, so we cannot check license compatibility here. + add_project_arguments('-DHAVE_SRT=1', language: 'cpp') +endif + top_include = include_directories('.') subdir('shared') @@ -62,7 +73,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] + qcustomplotdep, threaddep, eigendep, srtdep] nageru_include_dirs = [include_directories('nageru')] nageru_link_with = [] nageru_build_rpath = '' @@ -83,7 +94,7 @@ if have_cef system_cef = (cef_build_type == 'system') if system_cef cef_lib_dir = cef_dir - cef_resource_dir = '/usr/share/cef/Resources' + cef_resource_dir = cef_dir else cef_lib_dir = join_paths(cef_dir, cef_build_type) cef_resource_dir = join_paths(cef_dir, 'Resources') @@ -94,7 +105,7 @@ if have_cef nageru_install_rpath = '$ORIGIN/' endif - cefdep = cxx.find_library('cef') + cefdep = cxx.find_library('cef', dirs: cef_lib_dir) nageru_deps += cefdep # CEF wrapper library; not built as part of the CEF binary distribution, @@ -104,7 +115,7 @@ if have_cef nageru_deps += cefdlldep else cmake = find_program('cmake') - cef_compile_script = find_program('scripts/compile_cef_dll_wrapper.sh') + cef_compile_script = find_program('nageru/scripts/compile_cef_dll_wrapper.sh') cef_dll_target = custom_target('libcef_dll_wrapper', input: join_paths(cef_dir, 'libcef_dll/CMakeLists.txt'), @@ -118,7 +129,7 @@ if have_cef nageru_deps += cefdlldep endif - cef_libs = ['libEGL.so', 'libGLESv2.so', 'natives_blob.bin', 'snapshot_blob.bin', 'v8_context_snapshot.bin'] + 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'] if not get_option('cef_no_icudtl') cef_resources += ['icudtl.dat'] @@ -192,13 +203,14 @@ nageru_link_with += audio # Mixer objects. nageru_srcs += ['nageru/chroma_subsampler.cpp', 'nageru/v210_converter.cpp', 'nageru/mixer.cpp', 'nageru/pbo_frame_allocator.cpp', - 'nageru/theme.cpp', 'nageru/image_input.cpp', 'nageru/alsa_output.cpp', + 'nageru/theme.cpp', 'nageru/scene.cpp', 'nageru/image_input.cpp', 'nageru/alsa_output.cpp', 'nageru/timecode_renderer.cpp', 'nageru/tweaked_inputs.cpp', 'nageru/mjpeg_encoder.cpp'] # Streaming and encoding objects (largely the set that is shared between Nageru and Kaeru). stream_srcs = ['nageru/quicksync_encoder.cpp', 'nageru/x264_encoder.cpp', 'nageru/x264_dynamic.cpp', 'nageru/x264_speed_control.cpp', 'nageru/video_encoder.cpp', 'nageru/audio_encoder.cpp', 'nageru/ffmpeg_util.cpp', 'nageru/ffmpeg_capture.cpp', - 'nageru/print_latency.cpp', 'nageru/basic_stats.cpp', 'nageru/ref_counted_frame.cpp'] + 'nageru/print_latency.cpp', 'nageru/basic_stats.cpp', 'nageru/ref_counted_frame.cpp', + 'nageru/v4l_output.cpp'] stream = static_library('stream', stream_srcs, dependencies: nageru_deps, include_directories: nageru_include_dirs) nageru_link_with += stream @@ -257,7 +269,7 @@ executable('kaeru', 'nageru/kaeru.cpp', executable('benchmark_audio_mixer', 'nageru/benchmark_audio_mixer.cpp', dependencies: nageru_deps, include_directories: nageru_include_dirs, link_with: [audio, aux]) # These are needed for a default run. -data_files = ['nageru/theme.lua', 'nageru/simple.lua', 'nageru/bg.jpeg', 'nageru/akai_midimix.midimapping'] +data_files = ['nageru/theme.lua', 'nageru/simple.lua', 'nageru/bg.jpeg', 'nageru/akai_midimix.midimapping', 'futatabi/behringer_cmd_pl1.midimapping'] install_data(data_files, install_dir: join_paths(get_option('prefix'), 'share/nageru')) foreach file : data_files run_command('ln', '-s', join_paths(meson.current_source_dir(), file), meson.current_build_dir()) @@ -273,8 +285,9 @@ proto_generated = gen.process('futatabi/state.proto', 'futatabi/frame.proto', 'f # Preprocess Qt as needed. moc_files = qt5.preprocess( - moc_headers: ['futatabi/mainwindow.h', 'futatabi/jpeg_frame_view.h', 'futatabi/clip_list.h'], - ui_files: ['futatabi/mainwindow.ui'], + moc_headers: ['futatabi/mainwindow.h', 'futatabi/jpeg_frame_view.h', 'futatabi/clip_list.h', 'futatabi/midi_mapping_dialog.h'], + ui_files: ['futatabi/mainwindow.ui', 'futatabi/midi_mapping.ui'], + qresources: ['futatabi/mainwindow.qrc'], dependencies: qt5deps) # Flow objects. @@ -284,7 +297,8 @@ futatabi_srcs = ['futatabi/flow.cpp', 'futatabi/gpu_timers.cpp'] futatabi_srcs += ['futatabi/main.cpp', 'futatabi/player.cpp', 'futatabi/video_stream.cpp', 'futatabi/chroma_subsampler.cpp'] futatabi_srcs += ['futatabi/vaapi_jpeg_decoder.cpp', 'futatabi/db.cpp', 'futatabi/ycbcr_converter.cpp', 'futatabi/flags.cpp'] futatabi_srcs += ['futatabi/mainwindow.cpp', 'futatabi/jpeg_frame_view.cpp', 'futatabi/clip_list.cpp', 'futatabi/frame_on_disk.cpp'] -futatabi_srcs += ['futatabi/export.cpp', 'futatabi/midi_mapper.cpp'] +futatabi_srcs += ['futatabi/export.cpp', 'futatabi/midi_mapper.cpp', 'futatabi/midi_mapping_dialog.cpp'] +futatabi_srcs += ['futatabi/exif_parser.cpp', 'futatabi/pbo_pool.cpp'] futatabi_srcs += moc_files futatabi_srcs += proto_generated @@ -302,7 +316,7 @@ futatabi_shader_srcs = bin2h_gen.process(shaders) futatabi_srcs += futatabi_shader_srcs executable('futatabi', futatabi_srcs, - dependencies: [shareddep, qt5deps, libjpegdep, movitdep, libmicrohttpddep, protobufdep, sqlite3dep, vax11dep, vadrmdep, x11dep, libavformatdep, libavcodecdep, libavutildep, libswscaledep], + dependencies: [shareddep, qt5deps, libjpegdep, movitdep, libmicrohttpddep, protobufdep, sqlite3dep, vax11dep, vadrmdep, x11dep, threaddep, libavformatdep, libavcodecdep, libavutildep, libswscaledep, eigendep], link_with: shared, include_directories: [include_directories('futatabi')], install: true)