Skip to content

Commit

Permalink
Implement meson build
Browse files Browse the repository at this point in the history
This is a first pass at porting autoconf/automake to Meson.

Signed-off-by: Matt Jolly <[email protected]>
  • Loading branch information
Kangie committed Oct 1, 2024
1 parent 109ac1a commit 8ad51db
Show file tree
Hide file tree
Showing 7 changed files with 726 additions and 0 deletions.
70 changes: 70 additions & 0 deletions dpi/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
dpi_link_libs = [dlib, dpip]

bookmarks_dpi_sources = files(
'bookmarks.c',
'dpiutil.c',
)

cookies_dpi_sources = files(
'cookies.c',
'dpiutil.c',
)

datauri_filter_dpi_sources = files(
'datauri.c',
'dpiutil.c',
)

downloads_dpi_sources = files(
'downloads.cc',
'dpiutil.c',
)

file_dpi_sources = files(
'dpiutil.c',
'file.c',
)

ftp_filter_dpi_sources = files(
'dpiutil.c',
'ftp.c',
)

hello_filter_dpi_sources = files(
'dpiutil.c',
'hello.c',
)

vsource_filter_dpi_sources = files(
'dpiutil.c',
'vsource.c',
)

dpis = {
'bookmarks': bookmarks_dpi_sources,
'cookies': cookies_dpi_sources,
'datauri.filter': datauri_filter_dpi_sources,
'downloads': downloads_dpi_sources,
'file': file_dpi_sources,
'ftp.filter': ftp_filter_dpi_sources,
'hello.filter': hello_filter_dpi_sources,
'vsource.filter': vsource_filter_dpi_sources,
}

# These are all so similar that it's trivial to iterate over
foreach dpi_name, dpi : dpis
installdir = (
get_option('libdir') / meson.project_name() / 'dpi' / dpi_name.split(
'.',
)[0]
)
executable(
f'@[email protected]',
sources: dpi,
dependencies: fltk,
link_with: dpi_link_libs,
install: true,
install_dir: installdir,
include_directories: [incdir, fltk_include_dirs],
)
endforeach
45 changes: 45 additions & 0 deletions dpid/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
dpid_sources = files(
'dpi.c',
'dpi_socket_dir.c',
'dpid.c',
'dpid_common.c',
'main.c',
'misc_new.c',
)

link_libs = [
dlib,
dpip,
]

executable(
'dpid',
sources: dpid_sources,
include_directories: incdir,
link_with: link_libs,
install: true,
)

executable(
'dpidc',
sources: 'dpidc.c',
include_directories: incdir,
link_with: link_libs,
install: true,
)

sed = find_program('sed', required: true)
dpid_libdir = get_option('libdir') # TODO: Can we reuse this?
configure_file(
input: 'dpidrc.in',
output: 'dpidrc',
command: [
sed,
'-e', f's|[@]libdir[@]|@dpid_libdir@|;s|[@]EXEEXT[@]|@exe_suffix@|g',
'@INPUT@',
],
install_dir: get_option('sysconfdir'),
install: true,
)


74 changes: 74 additions & 0 deletions dw/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
dwcore_sources = files(
'findtext.cc',
'imgrenderer.cc',
'iterator.cc',
'layout.cc',
'selection.cc',
'stackingcontextmgr.cc',
'style.cc',
'tools.cc',
'types.cc',
'ui.cc',
'widget.cc',
)

dw_fltk_sources = files(
'fltkcomplexbutton.cc',
'fltkflatview.cc',
'fltkimgbuf.cc',
'fltkmisc.cc',
'fltkplatform.cc',
'fltkpreview.cc',
'fltkui.cc',
'fltkviewbase.cc',
'fltkviewport.cc',
)

dw_widgets_sources = files(
'alignedtablecell.cc',
'alignedtextblock.cc',
'bullet.cc',
'hyphenator.cc',
'image.cc',
'listitem.cc',
'oofawarewidget.cc',
'oofawarewidget_iterator.cc',
'ooffloatsmgr.cc',
'oofposabslikemgr.cc',
'oofposabsmgr.cc',
'oofposfixedmgr.cc',
'oofpositionedmgr.cc',
'oofposrelmgr.cc',
'outofflowmgr.cc',
'regardingborder.cc',
'ruler.cc',
'simpletablecell.cc',
'table.cc',
'table_iterator.cc',
'tablecell.cc',
'textblock.cc',
'textblock_iterator.cc',
'textblock_linebreaking.cc',
)

dwcore = static_library(
'dwcore',
sources: dwcore_sources,
include_directories: incdir,
)

dw_fltk = static_library(
'dw_fltk',
sources: dw_fltk_sources,
# libDw_fltk_a_CXXFLAGS = @LIBFLTK_CXXFLAGS@
include_directories: [fltk_include_dirs, incdir],
)

dw_widgets = static_library(
'dw_widgets',
sources: dw_widgets_sources,
include_directories: incdir,
link_with: liblout,
)

dillo_libs += [dwcore, dw_fltk, dw_widgets]
Loading

0 comments on commit 8ad51db

Please sign in to comment.