Set up the Unix meson.build. That seems to work too.

This commit is contained in:
Pietro Gagliardi 2019-03-23 21:06:19 -04:00
parent cdd997b6f6
commit dff8ec0f22
2 changed files with 72 additions and 7 deletions

View File

@ -13,7 +13,7 @@
# we have to specify C++ here even if we're not using C++ immediately because otherwise none of the C++ built-in options are available (sigh; TODO)
# and same for Objective-C because of add_project_arguments() (double sigh; TODO)
project('libui', ['c', 'cpp', 'objc'],
project('libui', ['c', 'cpp'],
default_options: [
'buildtype=debug', # build debug by default
'default_library=shared', # build shared libraries by default
@ -32,6 +32,11 @@ project('libui', ['c', 'cpp', 'objc'],
libui_OS = host_machine.system()
libui_MSVC = meson.get_compiler('c').get_id() == 'msvc'
if libui_OS == 'darwin'
add_language('objc',
required: true)
endif
# TODO switch to tabs; the spaces are just so I can share this file while I'm writing it
libui_forced_options = {
'warning_level': '3', # always max warnings
@ -85,12 +90,6 @@ elif libui_OS == 'darwin'
add_project_link_arguments(libui_macosx_version_min,
language: ['c', 'cpp', 'objc'])
else
libui_deps += [dependency('gtk+-3.0',
version: '>=3.10.0',
method: 'pkg-config',
required: true)]
libui_soversion = '0'
libui_rpath = '$ORIGIN'
endif
# TODO see if there's a more direct way to set any of these
@ -138,6 +137,8 @@ endif
libui_sources = []
libui_base_include_directories = [include_directories('.')]
libui_include_directories = libui_base_include_directories
# TODO make this not +=
libui_deps += []
libui_extra_libs = []
subdir('common')
if libui_OS == 'windows'

64
unix/meson.build Normal file
View File

@ -0,0 +1,64 @@
# 23 march 2019
libui_sources += [
'unix/alloc.c',
'unix/area.c',
'unix/attrstr.c',
'unix/box.c',
'unix/button.c',
'unix/cellrendererbutton.c',
'unix/checkbox.c',
'unix/child.c',
'unix/colorbutton.c',
'unix/combobox.c',
'unix/control.c',
'unix/datetimepicker.c',
'unix/debug.c',
'unix/draw.c',
'unix/drawmatrix.c',
'unix/drawpath.c',
'unix/drawtext.c',
'unix/editablecombo.c',
'unix/entry.c',
'unix/fontbutton.c',
'unix/fontmatch.c',
'unix/form.c',
'unix/future.c',
'unix/graphemes.c',
'unix/grid.c',
'unix/group.c',
'unix/image.c',
'unix/label.c',
'unix/main.c',
'unix/menu.c',
'unix/multilineentry.c',
'unix/opentype.c',
'unix/progressbar.c',
'unix/radiobuttons.c',
'unix/separator.c',
'unix/slider.c',
'unix/spinbox.c',
'unix/stddialogs.c',
'unix/tab.c',
'unix/table.c',
'unix/tablemodel.c',
'unix/text.c',
'unix/util.c',
'unix/window.c',
]
libui_include_directories += [include_directories('.')]
libui_deps += [
dependency('gtk+-3.0',
version: '>=3.10.0',
method: 'pkg-config',
required: true),
# TODO are there better ways for these two?
meson.get_compiler('c').find_library('m',
required: true),
meson.get_compiler('c').find_library('dl',
required: true),
]
libui_soversion = '0'
libui_rpath = '$ORIGIN'