qulogic/gplugin

Remove option to disable unit testing.
develop
2017-06-09, Elliott Sales de Andrade
ce727a8da6d1
Remove option to disable unit testing.

There are no extra dependencies for it and builds are fast enough
using Meson and Ninja that it doesn't really have much benefit to
disable it.
if get_option('python')
if not get_option('gobject-introspection')
error('Python plugin requires GObject Introspection.')
endif
GPLUGIN_PYTHON_SOURCES = [
'gplugin-python-core.c',
'gplugin-python-loader.c',
'gplugin-python-plugin.c',
'gplugin-python-utils.c',
]
GPLUGIN_PYTHON_HEADERS = [
'gplugin-python-loader.h',
'gplugin-python-plugin.h',
'gplugin-python-utils.h',
]
PYTHON3 = dependency('python3')
PYGOBJECT = dependency('pygobject-3.0', version : '>=3.0.0')
# Compile and run our python-gi test program
python_gi_test = compiler.run(files('gplugin-python-test-pygobject.c'),
dependencies : [GLIB, PYTHON3, PYGOBJECT],
name : 'Python GI')
if not python_gi_test.compiled() or python_gi_test.returncode() != 0
error('pygobject does not work with python3')
endif
# Now add our libraries
gplugin_python_inc = include_directories('.')
gplugin_python = shared_library('gplugin-python',
GPLUGIN_PYTHON_SOURCES,
GPLUGIN_PYTHON_HEADERS,
name_prefix : '',
dependencies : [PYTHON3, PYGOBJECT, gplugin_dep],
install : true,
install_dir : join_paths(get_option('libdir'), 'gplugin')
)
gplugin_python_dep = declare_dependency(
include_directories : gplugin_python_inc,
link_with : gplugin_python,
)
gplugin_python_static = static_library('gplugin-python-static',
GPLUGIN_PYTHON_SOURCES,
GPLUGIN_PYTHON_HEADERS,
dependencies : [PYTHON3, PYGOBJECT, gplugin_dep],
)
gplugin_python_static_dep = declare_dependency(
include_directories : gplugin_python_inc,
link_with : gplugin_python_static,
)
endif # python
subdir('tests')