mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
meson: Make sink compile on Windows OS
We cannot compile app as a whole on MS Windows yet, but with those changes it is now possible to compile and run our new video sink alone on Windows OS
This commit is contained in:
20
lib/gst/clapper/meson.build
vendored
20
lib/gst/clapper/meson.build
vendored
@@ -43,6 +43,10 @@ if not gtk4_dep.version().version_compare('>=4.0.0')
|
|||||||
error('GTK4 version on this system is too old')
|
error('GTK4 version on this system is too old')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not gir.found()
|
||||||
|
error('Cannot build lib without GIR support')
|
||||||
|
endif
|
||||||
|
|
||||||
if gst_gl_have_window_x11 and (gst_gl_have_platform_egl or gst_gl_have_platform_glx)
|
if gst_gl_have_window_x11 and (gst_gl_have_platform_egl or gst_gl_have_platform_glx)
|
||||||
gtk_x11_dep = dependency('gtk4-x11', required: false)
|
gtk_x11_dep = dependency('gtk4-x11', required: false)
|
||||||
if gtk_x11_dep.found()
|
if gtk_x11_dep.found()
|
||||||
@@ -76,6 +80,18 @@ gstclapper_mpris_gdbus = gnome.gdbus_codegen('gstclapper-mpris-gdbus',
|
|||||||
namespace: 'GstClapperMpris'
|
namespace: 'GstClapperMpris'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
gstclapper_deps = [
|
||||||
|
gtk4_dep, glib_dep, gio_dep,
|
||||||
|
gstbase_dep, gstvideo_dep, gstaudio_dep,
|
||||||
|
gsttag_dep, gstpbutils_dep, libm
|
||||||
|
] + gtk_deps
|
||||||
|
|
||||||
|
if os_unix
|
||||||
|
gstclapper_deps += giounix_dep
|
||||||
|
else
|
||||||
|
gstclapper_deps += giowin_dep
|
||||||
|
endif
|
||||||
|
|
||||||
gstclapper = library('gstclapper-' + api_version,
|
gstclapper = library('gstclapper-' + api_version,
|
||||||
gstclapper_sources + gstclapper_mpris_gdbus,
|
gstclapper_sources + gstclapper_mpris_gdbus,
|
||||||
c_args: gstclapper_defines,
|
c_args: gstclapper_defines,
|
||||||
@@ -84,9 +100,7 @@ gstclapper = library('gstclapper-' + api_version,
|
|||||||
version: libversion,
|
version: libversion,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: pkglibdir,
|
install_dir: pkglibdir,
|
||||||
dependencies: [gtk4_dep, glib_dep, gio_dep, giounix_dep,
|
dependencies: gstclapper_deps,
|
||||||
gstbase_dep, gstvideo_dep, gstaudio_dep,
|
|
||||||
gsttag_dep, gstpbutils_dep, libm] + gtk_deps,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
clapper_gir = gnome.generate_gir(gstclapper,
|
clapper_gir = gnome.generate_gir(gstclapper,
|
||||||
|
11
lib/meson.build
vendored
11
lib/meson.build
vendored
@@ -9,6 +9,8 @@ cxx = meson.get_compiler('cpp')
|
|||||||
|
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
|
|
||||||
|
os_unix = host_machine.system() != 'windows'
|
||||||
|
|
||||||
if cc.get_id() == 'msvc'
|
if cc.get_id() == 'msvc'
|
||||||
msvc_args = [
|
msvc_args = [
|
||||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||||
@@ -243,7 +245,12 @@ libm = cc.find_library('m', required: false)
|
|||||||
glib_dep = dependency('glib-2.0', version: glib_req, fallback: ['glib', 'libglib_dep'])
|
glib_dep = dependency('glib-2.0', version: glib_req, fallback: ['glib', 'libglib_dep'])
|
||||||
gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
|
gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
|
||||||
gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
|
gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
|
||||||
giounix_dep = dependency('gio-unix-2.0', version: glib_req, fallback: ['glib', 'libgiounix_dep'])
|
|
||||||
|
if os_unix
|
||||||
|
giounix_dep = dependency('gio-unix-2.0', version: glib_req, fallback: ['glib', 'libgio_dep'])
|
||||||
|
else
|
||||||
|
giowin_dep = dependency('gio-windows-2.0', version: glib_req, fallback : ['glib', 'libgio_dep'])
|
||||||
|
endif
|
||||||
|
|
||||||
cdata.set('DISABLE_ORC', 1)
|
cdata.set('DISABLE_ORC', 1)
|
||||||
cdata.set('GST_ENABLE_EXTRA_CHECKS', get_option('devel-checks'))
|
cdata.set('GST_ENABLE_EXTRA_CHECKS', get_option('devel-checks'))
|
||||||
@@ -251,7 +258,7 @@ cdata.set('GST_ENABLE_EXTRA_CHECKS', get_option('devel-checks'))
|
|||||||
configinc = include_directories('.')
|
configinc = include_directories('.')
|
||||||
libsinc = include_directories('gst')
|
libsinc = include_directories('gst')
|
||||||
|
|
||||||
gir = find_program('g-ir-scanner')
|
gir = find_program('g-ir-scanner', required: false)
|
||||||
gir_init_section = ['--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
gir_init_section = ['--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
||||||
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
|
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
|
||||||
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
|
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
|
||||||
|
Reference in New Issue
Block a user