PIKApp/plug-ins/screenshot/meson.build

50 lines
1.1 KiB
Meson
Raw Normal View History

2023-09-26 00:35:21 +02:00
plugin_name = 'screenshot'
plugin_sources = [
'screenshot-freedesktop.c',
'screenshot-osx.c',
'screenshot-win32.c',
'screenshot-x11.c',
'screenshot.c',
]
screenshot_icons_images = [
'screenshot-icon.png',
]
resourcename = 'screenshot-icons'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/technology.heckin/screenshot-icons">\n'
foreach file : screenshot_icons_images
xml_content+=' <file>'+ file +'</file>\n'
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
xml_file = configure_file(
output: resourcename + '.gresource.xml',
command: [ 'echo', xml_content ],
capture: true,
)
plugin_sources += gnome.compile_resources(
resourcename,
xml_file,
c_name: resourcename.underscorify(),
)
if platform_windows
plugin_sources += windows.compile_resources('screenshot-win32.rc')
endif
screenshot = executable('screenshot',
plugin_sources,
dependencies: [
libpikaui_dep,
x11, xmu, xext, xfixes,
],
install: true,
install_dir: pikaplugindir / 'plug-ins' / plugin_name,
)