diff --git a/meson.build b/meson.build index 85f28ef7..aba58148 100644 --- a/meson.build +++ b/meson.build @@ -136,7 +136,8 @@ else endif libui_sources = [] -libui_include_directories = [include_directories('.')] +libui_base_include_directories = [include_directories('.')] +libui_include_directories = libui_base_include_directories libui_extra_libs = [] subdir('common') if libui_OS == 'windows' @@ -156,8 +157,16 @@ libui_libui = library('ui', libui_sources, install_rpath: libui_rpath, install: true, gnu_symbol_visibility: 'hidden', - soversion: libui_soversion) + c_args: ['-Dlibui_EXPORTS'], + cpp_args: ['-Dlibui_EXPORTS'], + objc_args: ['-Dlibui_EXPORTS'], + soversion: libui_soversion, + darwin_versions: []) # TODO install_headers('ui.h') -# TODO test +libui_binary_deps = [] +if libui_mode == 'static' + libui_binary_deps = libui_deps +endif +subdir('test') # TODO examples diff --git a/test/meson.build b/test/meson.build new file mode 100644 index 00000000..455154be --- /dev/null +++ b/test/meson.build @@ -0,0 +1,42 @@ +# 23 march 2019 + +# TODO +#if(WIN32) +# set(_TEST_RESOURCES_RC resources.rc) +#endif() + +libui_test_sources = [ + 'drawtests.c', + 'images.c', + 'main.c', + 'menus.c', + 'page1.c', + 'page2.c', + 'page3.c', + 'page4.c', + 'page5.c', + 'page6.c', + 'page7.c', + 'page7a.c', + 'page7b.c', + 'page7c.c', +# 'page8.c', +# 'page9.c', +# 'page10.c', + 'page11.c', + 'page12.c', + 'page13.c', + 'page14.c', + 'page15.c', + 'page16.c', + 'spaced.c', +] + +# TODO meson doesn't let us name this target test, but also doesn't seem to provide a way to override the executable name???? +executable('tester', libui_test_sources, + include_directories: libui_base_include_directories + [include_directories('.')], + dependencies: libui_binary_deps, + link_with: libui_libui, + build_by_default: false, + gui_app: false, + install: false)