Set up the Unix meson.build. That seems to work too.
This commit is contained in:
parent
cdd997b6f6
commit
dff8ec0f22
15
meson.build
15
meson.build
|
@ -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)
|
# 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)
|
# and same for Objective-C because of add_project_arguments() (double sigh; TODO)
|
||||||
project('libui', ['c', 'cpp', 'objc'],
|
project('libui', ['c', 'cpp'],
|
||||||
default_options: [
|
default_options: [
|
||||||
'buildtype=debug', # build debug by default
|
'buildtype=debug', # build debug by default
|
||||||
'default_library=shared', # build shared libraries 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_OS = host_machine.system()
|
||||||
libui_MSVC = meson.get_compiler('c').get_id() == 'msvc'
|
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
|
# TODO switch to tabs; the spaces are just so I can share this file while I'm writing it
|
||||||
libui_forced_options = {
|
libui_forced_options = {
|
||||||
'warning_level': '3', # always max warnings
|
'warning_level': '3', # always max warnings
|
||||||
|
@ -85,12 +90,6 @@ elif libui_OS == 'darwin'
|
||||||
add_project_link_arguments(libui_macosx_version_min,
|
add_project_link_arguments(libui_macosx_version_min,
|
||||||
language: ['c', 'cpp', 'objc'])
|
language: ['c', 'cpp', 'objc'])
|
||||||
else
|
else
|
||||||
libui_deps += [dependency('gtk+-3.0',
|
|
||||||
version: '>=3.10.0',
|
|
||||||
method: 'pkg-config',
|
|
||||||
required: true)]
|
|
||||||
libui_soversion = '0'
|
|
||||||
libui_rpath = '$ORIGIN'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# TODO see if there's a more direct way to set any of these
|
# TODO see if there's a more direct way to set any of these
|
||||||
|
@ -138,6 +137,8 @@ endif
|
||||||
libui_sources = []
|
libui_sources = []
|
||||||
libui_base_include_directories = [include_directories('.')]
|
libui_base_include_directories = [include_directories('.')]
|
||||||
libui_include_directories = libui_base_include_directories
|
libui_include_directories = libui_base_include_directories
|
||||||
|
# TODO make this not +=
|
||||||
|
libui_deps += []
|
||||||
libui_extra_libs = []
|
libui_extra_libs = []
|
||||||
subdir('common')
|
subdir('common')
|
||||||
if libui_OS == 'windows'
|
if libui_OS == 'windows'
|
||||||
|
|
|
@ -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'
|
Loading…
Reference in New Issue