2017-05-25 00:16:27 +00:00
|
|
|
st_headers = [
|
|
|
|
'st-adjustment.h',
|
|
|
|
'st-bin.h',
|
|
|
|
'st-border-image.h',
|
|
|
|
'st-box-layout.h',
|
|
|
|
'st-box-layout-child.h',
|
|
|
|
'st-button.h',
|
|
|
|
'st-clipboard.h',
|
|
|
|
'st-drawing-area.h',
|
|
|
|
'st-entry.h',
|
|
|
|
'st-focus-manager.h',
|
|
|
|
'st-generic-accessible.h',
|
|
|
|
'st-icon.h',
|
|
|
|
'st-icon-colors.h',
|
2019-02-26 23:23:40 +00:00
|
|
|
'st-image-content.h',
|
2017-05-25 00:16:27 +00:00
|
|
|
'st-label.h',
|
|
|
|
'st-scrollable.h',
|
|
|
|
'st-scroll-bar.h',
|
|
|
|
'st-scroll-view.h',
|
2019-05-13 19:01:19 +00:00
|
|
|
'st-scroll-view-fade.h',
|
2019-01-30 20:33:33 +00:00
|
|
|
'st-settings.h',
|
2017-05-25 00:16:27 +00:00
|
|
|
'st-shadow.h',
|
|
|
|
'st-texture-cache.h',
|
|
|
|
'st-theme.h',
|
|
|
|
'st-theme-context.h',
|
|
|
|
'st-theme-node.h',
|
|
|
|
'st-types.h',
|
|
|
|
'st-widget.h',
|
|
|
|
'st-widget-accessible.h'
|
|
|
|
]
|
|
|
|
|
|
|
|
st_includes = []
|
|
|
|
foreach include : st_headers
|
|
|
|
st_includes += '#include <@0@>'.format(include)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
st_h_data = configuration_data()
|
|
|
|
st_h_data.set('includes', '\n'.join(st_includes))
|
|
|
|
|
|
|
|
st_h = configure_file(
|
|
|
|
input: 'st.h.in',
|
|
|
|
output: 'st.h',
|
|
|
|
configuration: st_h_data
|
|
|
|
)
|
|
|
|
|
|
|
|
st_inc = include_directories('.', '..')
|
|
|
|
|
|
|
|
st_private_headers = [
|
|
|
|
'st-private.h',
|
|
|
|
'st-theme-private.h',
|
|
|
|
'st-theme-node-private.h',
|
|
|
|
'st-theme-node-transition.h'
|
|
|
|
]
|
|
|
|
|
|
|
|
# please, keep this sorted alphabetically
|
|
|
|
st_sources = [
|
|
|
|
'st-adjustment.c',
|
|
|
|
'st-bin.c',
|
|
|
|
'st-border-image.c',
|
|
|
|
'st-box-layout.c',
|
|
|
|
'st-box-layout-child.c',
|
|
|
|
'st-button.c',
|
|
|
|
'st-clipboard.c',
|
|
|
|
'st-drawing-area.c',
|
|
|
|
'st-entry.c',
|
|
|
|
'st-focus-manager.c',
|
|
|
|
'st-generic-accessible.c',
|
|
|
|
'st-icon.c',
|
|
|
|
'st-icon-colors.c',
|
2019-02-26 23:23:40 +00:00
|
|
|
'st-image-content.c',
|
2017-05-25 00:16:27 +00:00
|
|
|
'st-label.c',
|
|
|
|
'st-private.c',
|
|
|
|
'st-scrollable.c',
|
|
|
|
'st-scroll-bar.c',
|
|
|
|
'st-scroll-view.c',
|
2019-05-13 19:01:19 +00:00
|
|
|
'st-scroll-view-fade.c',
|
2019-01-30 20:33:33 +00:00
|
|
|
'st-settings.c',
|
2017-05-25 00:16:27 +00:00
|
|
|
'st-shadow.c',
|
|
|
|
'st-texture-cache.c',
|
|
|
|
'st-theme.c',
|
|
|
|
'st-theme-context.c',
|
|
|
|
'st-theme-node.c',
|
|
|
|
'st-theme-node-drawing.c',
|
|
|
|
'st-theme-node-transition.c',
|
|
|
|
'st-widget.c'
|
|
|
|
]
|
|
|
|
|
2017-08-15 19:54:48 +00:00
|
|
|
st_enums = gnome.mkenums_simple('st-enum-types',
|
2017-05-25 00:16:27 +00:00
|
|
|
sources: st_headers,
|
2017-08-15 19:54:48 +00:00
|
|
|
header_prefix: '''
|
|
|
|
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
|
|
|
|
#error "Only <st/st.h> can be included directly.h"
|
|
|
|
#endif'''
|
2017-05-25 00:16:27 +00:00
|
|
|
)
|
|
|
|
|
2017-08-11 15:13:53 +00:00
|
|
|
st_gir_sources = st_sources + st_private_headers + st_headers + st_enums
|
2017-05-25 00:16:27 +00:00
|
|
|
|
|
|
|
data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
|
|
|
|
|
|
|
|
custom_target('scroll-view-fade-glsl',
|
|
|
|
input: ['st-scroll-view-fade.glsl'],
|
|
|
|
output: ['st-scroll-view-fade-generated.c'],
|
|
|
|
build_by_default: true,
|
|
|
|
capture: true,
|
|
|
|
command: [data_to_c, '@INPUT@', 'st_scroll_view_fade_glsl']
|
|
|
|
)
|
|
|
|
|
|
|
|
st_cflags = [
|
|
|
|
'-I@0@/src'.format(meson.source_root()),
|
|
|
|
'-I@0@'.format(meson.build_root()),
|
|
|
|
'-DPREFIX="@0@"'.format(prefix),
|
|
|
|
'-DLIBDIR="@0@"'.format(libdir),
|
|
|
|
'-DG_LOG_DOMAIN="St"',
|
|
|
|
'-DST_COMPILATION',
|
|
|
|
'-DCLUTTER_ENABLE_EXPERIMENTAL_API',
|
|
|
|
'-DCOGL_ENABLE_EXPERIMENTAL_API',
|
|
|
|
'-DPACKAGE_DATA_DIR="@0@"'.format(pkgdatadir)
|
|
|
|
]
|
|
|
|
|
|
|
|
# Currently meson requires a shared library for building girs
|
|
|
|
libst = shared_library('st-1.0',
|
2019-05-13 19:01:19 +00:00
|
|
|
sources: st_gir_sources,
|
2017-05-25 00:16:27 +00:00
|
|
|
c_args: st_cflags,
|
2018-11-26 11:54:23 +00:00
|
|
|
dependencies: [clutter_dep, gtk_dep, croco_dep, mutter_dep, m_dep],
|
2019-03-06 12:33:33 +00:00
|
|
|
build_rpath: mutter_typelibdir,
|
2017-05-25 00:16:27 +00:00
|
|
|
install_rpath: mutter_typelibdir,
|
|
|
|
install_dir: pkglibdir,
|
|
|
|
install: true
|
|
|
|
)
|
|
|
|
|
2017-08-10 22:30:42 +00:00
|
|
|
libst_dep = declare_dependency(link_with: libst,
|
2017-08-11 14:48:05 +00:00
|
|
|
sources: st_enums[1]
|
2017-08-10 22:30:42 +00:00
|
|
|
)
|
|
|
|
|
2017-05-25 00:16:27 +00:00
|
|
|
test_theme = executable('test-theme',
|
|
|
|
sources: 'test-theme.c',
|
|
|
|
c_args: st_cflags,
|
2019-08-25 13:57:11 +00:00
|
|
|
dependencies: [mutter_dep, gtk_dep],
|
2019-02-26 00:58:44 +00:00
|
|
|
build_rpath: mutter_typelibdir,
|
2017-05-25 00:16:27 +00:00
|
|
|
link_with: libst
|
|
|
|
)
|
|
|
|
|
2019-02-26 00:58:44 +00:00
|
|
|
test('CSS styling support', test_theme,
|
|
|
|
workdir: meson.current_source_dir()
|
|
|
|
)
|
|
|
|
|
2017-05-25 00:16:27 +00:00
|
|
|
libst_gir = gnome.generate_gir(libst,
|
|
|
|
sources: st_gir_sources,
|
|
|
|
nsversion: '1.0',
|
|
|
|
namespace: 'St',
|
2018-11-26 11:54:23 +00:00
|
|
|
includes: ['Clutter-' + mutter_api_version, 'Cally-' + mutter_api_version, 'Meta-' + mutter_api_version, 'Gtk-3.0'],
|
2017-05-25 00:16:27 +00:00
|
|
|
dependencies: [mutter_dep],
|
|
|
|
include_directories: include_directories('..'),
|
|
|
|
extra_args: ['-DST_COMPILATION', '--quiet'],
|
|
|
|
install_dir_gir: pkgdatadir,
|
|
|
|
install_dir_typelib: pkglibdir,
|
|
|
|
install: true
|
|
|
|
)
|