1 cpp = meson.get_compiler('cpp')
2 qt5_dep = dependency('qt5', modules: ['Qml', 'Quick', 'Gui'])
3 dep_wayland_client = dependency('wayland-client', version: '>= 1.20.0')
5 dependency('qtappfw-weather'),
6 dependency('qtappfw-network'),
7 dependency('qtappfw-bt'),
8 dependency('qtappfw-vehicle-signals'),
9 dependency('qtappfw-applauncher')
13 qpa_header_path = join_paths(qt5_dep.version(), 'QtGui')
14 qpa_header = join_paths(qpa_header_path, 'qpa/qplatformnativeinterface.h')
15 # we pass this QT_QPA_HEADER straight in the code as there's no easy
16 # way to pass the correct header
17 if cpp.has_header(qpa_header, dependencies : qt5_dep)
18 qt_defines += [ '-DQT_QPA_HEADER=<@0@>'.format(qpa_header) ]
19 message('Found QtGui QPA header in ' + qpa_header_path)
22 dep_scanner = dependency('wayland-scanner')
23 prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
24 agl_compositor_dep = dependency('agl-compositor-0.0.20-protocols')
25 dir_agl_compositor_base = agl_compositor_dep.get_pkgconfig_variable('pkgdatadir')
33 homescreen_resources = [
34 'qml/images/MediaPlayer/mediaplayer.qrc',
35 'qml/images/MediaMusic/mediamusic.qrc',
36 'qml/images/Weather/weather.qrc',
37 'qml/images/Shortcut/shortcut.qrc',
38 'qml/images/Status/status.qrc',
39 'qml/images/images.qrc',
43 resource_files = qt5.compile_resources(sources: homescreen_resources)
46 [ 'agl-shell', 'agl-compositor' ],
49 foreach proto: protocols
51 if proto[1] == 'agl-compositor'
52 base_file = proto_name
53 xml_path = join_paths(dir_agl_compositor_base, '@0@.xml'.format(base_file))
56 foreach output_type: [ 'client-header', 'server-header', 'private-code' ]
57 if output_type == 'client-header'
58 output_file = '@0@-client-protocol.h'.format(base_file)
59 elif output_type == 'server-header'
60 output_file = '@0@-server-protocol.h'.format(base_file)
62 output_file = '@0@-protocol.c'.format(base_file)
63 if dep_scanner.version().version_compare('< 1.14.91')
68 var_name = output_file.underscorify()
69 target = custom_target(
70 '@0@ @1@'.format(base_file, output_type),
71 command: [ prog_scanner, output_type, '@INPUT@', '@OUTPUT@' ],
75 message('protocol name is ' + var_name)
76 set_variable(var_name, target)
80 homescreen_src_headers = [
81 'src/applicationlauncher.h',
83 'src/statusbarmodel.h',
84 'src/statusbarserver.h',
85 'src/homescreenhandler.h',
89 moc_files = qt5.compile_moc(headers: homescreen_src_headers,
90 dependencies: qt5_dep)
94 'src/statusbarserver.cpp',
95 'src/statusbarmodel.cpp',
96 'src/applicationlauncher.cpp',
97 'src/mastervolume.cpp',
98 'src/homescreenhandler.cpp',
100 agl_shell_client_protocol_h,
104 executable('homescreen', homescreen_src, resource_files, moc_files,
105 cpp_args: qt_defines,
106 dependencies : homescreen_dep,